WordPress.org

Forums

Post Types Order
[resolved] PHP Strict Standards (11 posts)

  1. Till Krüss
    Member
    Posted 1 year ago #

    I'm getting the following notice in my logs:

    PHP 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 /post-types-order/post-types-order.php on line 350

    http://wordpress.org/plugins/post-types-order/

  2. nsp-code
    Member
    Plugin Author

    Posted 1 year ago #

    So you use the latest plugin version 1.6.2 ?

  3. Till Krüss
    Member
    Posted 1 year ago #

    Yes, Plugin 1.6.2, WordPress 3.6.1 and PHP 5.4.9.

  4. Till Krüss
    Member
    Posted 1 year ago #

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

  5. leejosepho
    Member
    Posted 1 year ago #

    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

  6. nouveller
    Member
    Posted 1 year ago #

    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.

  7. leejosepho
    Member
    Posted 1 year ago #

    @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?

  8. nouveller
    Member
    Posted 1 year ago #

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

  9. leejosepho
    Member
    Posted 1 year ago #

    Sure enough, and many thanks!

  10. jjgleim
    Member
    Posted 1 year ago #

    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

  11. nsp-code
    Member
    Plugin Author

    Posted 1 year ago #

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

    Thanks

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.