• Resolved Jonathan

    (@jvdhelder)


    Hi,

    We just updated our php from 7.0 to 7.2 and now there no dropdowns when adding redirects. We can only use custom link and not select a page, post or something like that.

    Could you please fix this bug?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Temporary fix, until the plugin author does it, is to edit a plugin file: /wp-content/plugins/eps-301-redirects/class.drop-down-pages.php and at the bottom in class EPS_Walker_PageDropdown, in function start_el(…) make sure $output is array.
    So adjusted function will be:

    
    function start_el(&$output, $object, $depth = 0, $args = Array(), $current_object_id = 0)
        {
            /* vladski fix start - $output default value is string but this plugin uses it as array which PHP7 does not like */
            if(!is_array($output)) $output = array();
            /* vladski fix end */
    
            $pad = str_repeat(' ', $depth * 3);
            $output[$object->ID] = $pad . esc_html( apply_filters( 'list_pages', $object->post_title, $object ) ) . " (ID:{$object->ID})";
        }
    

    Just replace the function code. Be aware that any plugin update/re-install will remove this change but most likely it will be fixed by that time.

    Thanks for the suggested fix Vladski.
    We were also experiencing this problem after upgrade of PHP to 7.

    For anyone else reading this I had to amend the above code snippet slightly for it to work for us.

    The line:
    $output[$object->ID] = $pad . esc_html( apply_filters( 'list_pages', $object->post_title, $object ) ) . " (ID:{$object->ID})";

    Was changed to:
    $output[$object->ID] = $pad . esc_html( apply_filters( 'list_pages', $object->post_title, $object ) ) ;

    Which was what it was in the original file I had from the plugin vendor.

    Plugin Author WebFactory

    (@webfactory)

    Morning everyone,
    We took over development this week and are rushing to get a new version out. If there are any other issues, please let us know.

    Thank you for your patience!

    Thread Starter Jonathan

    (@jvdhelder)

    That is good news! When will the new version be available?

    Plugin Author WebFactory

    (@webfactory)

    The new version is up! Please don’t hesitate to report any other issues you find.

    Thread Starter Jonathan

    (@jvdhelder)

    Thanks! We will take a look! 🙂

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Please make it php 7.2 compatible!’ is closed to new replies.