• Resolved Gon?alo Peres

    (@gonperesgmailcom)


    The last update of this plugin is incompatible with PHP 5.4 and throws a “PHP Fatal error: Can’t use function return value in write context in /dir/wp-content/plugins/complete-open-graph/src/hooks/content-filters.php on line 54”

    To fix this I changed line 54 from:

    
    if (empty(get_avatar($userID))) {
        return $value;
    }
    

    to:

    
    $avatar = get_avatar($userID);
    if (empty($avatar)) {
        return $value;
    }
    

    Because prior to PHP 5.5, empty() only supports variables; anything else will result in a parse error
    https://php.net/manual/en/function.empty.php

Viewing 1 replies (of 1 total)
  • Plugin Author Alex MacArthur

    (@alexmacarthur)

    Thanks for reporting! I will fix this in an upcoming release, but do be aware that the plugin officially only supports PHP 5.6 and above.

Viewing 1 replies (of 1 total)
  • The topic ‘PHP Fatal Error’ is closed to new replies.