• Resolved gklauda

    (@gklauda)


    After an update our client got the error message:

    Fatal error: Can't use function return value in write context in /home/..../wp-content/plugins/prdctfltr/lib/pf-frontend.php on line 3221

    Line 3221 says:

    if ( !empty( array_intersect_key( self::$settings['v_attr'], $variables ) ) ) {

    It turns out that empty() cannot be used on a function return prior to PHP 5.5, but only on a variable. To make the plugin work again, I rewrote the line to:

    if ( array_intersect_key( self::$settings['v_attr'], $variables ) ) {

    I’d be very glad if you changed that in your code, so that the site doesn’t show a white screen again after the next update.

    All the best,
    Georg

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)

The topic ‘Using empty() on a function return throws a fatal error prior to PHP 5.5’ is closed to new replies.