WordPress.org

Support

Support » Plugins and Hacks » Post Types Order » [Resolved] PHP Strict Standards

[Resolved] PHP Strict Standards

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author nsp-code

    @nsp-code

    So you use the latest plugin version 1.6.2 ?

    Yes, Plugin 1.6.2, WordPress 3.6.1 and PHP 5.4.9.

    Any updates on this? It’s spamming my error log.

    I am receiving the same notice in WP 3.7.1 Debug and PHP 5.3:
    Strict Standards: Declaration of Post_Types_Order_Walker::start_el() should be compatible with Walker::start_el(&$output, $object, $depth = 0, $args = Array, $current_object_id = 0) in ~~/wp-content/plugins/post-types-order/post-types-order.php on line 350

    Guys, I have a hotfix if you need this working.

    Inside of the plugin, look for the start_el method. The declaration should looking something like this.

    function start_el(&$output, $post_info, $depth = 0, $args = array())

    This needs to match WordPress’ Walker class, which looks like this.

    function start_el( &$output, $object, $depth = 0, $args = array(), $current_object_id = 0 )

    So simply change:

    function start_el(&$output, $post_info, $depth = 0, $args = array())

    to

    function start_el(&$output, $post_info, $depth = 0, $args = array(), $current_object_id = 0)

    Be nice for the plugin author to implement this and issue an uodate.

    @nouveller:

    Many thanks for helping out here, and I have a question…

    In your first example, you changed $post_info, to $object, and then added $current_object_id = 0:

    function start_el(&$output, $post_info, $depth = 0, $args = array())
    function start_el( &$output, $object, $depth = 0, $args = array(), $current_object_id = 0 )

    In your second example, you only added $current_object_id = 0:

    function start_el(&$output, $post_info, $depth = 0, $args = array())
    function start_el(&$output, $post_info, $depth = 0, $args = array(), $current_object_id = 0)

    In the plugin’s file, I have found this:

    function start_el(&$output, $page, $depth = 0, $args = array())

    So, should I simply add $current_object_id = 0

    function start_el(&$output, $page, $depth = 0, $args = array(), $current_object_id = 0)

    …or do I need to do more there?

    Ah yes, our plugin versions may differ slightly but adding $current_object_id = 0 should fix it up!

    Sure enough, and many thanks!

    jjgleim

    @jjgleim

    I have the same error showing up in my logs. WP 3.7.1, PHP 5.4.10, PTO 1.6.2

    @nsp-code: Is there going to be a fix soon?

    Thanks,

    Jerrad

    Plugin Author nsp-code

    @nsp-code

    There will be a new version out on this Friday or possible at the end of next week.

    Thanks

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘[Resolved] PHP Strict Standards’ is closed to new replies.
Skip to toolbar