Tagged: 

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #926757

    We appear to have an issue with our website breaking (error 500) after each Enfold Theme Update.

    Received from Hosting company:
    “Here is the error:
    “FastCGI: server “/usr/lib/cgi-bin/php5-fpm” stderr: PHP message:
    PHP Fatal error: Can’t use function return value in write context in /web/sites/iadesigns/tln.com/wp-content/themes/enfold/header.php on line 6. We commented out line 6 so the site will load.”

    I then asked if this line needs to be commented out after EACH update, they responded “Yes.This is a code issue with the theme. You should reach out to the programmer.”

    This is what my programmer tells me:
    I think it’s having trouble with: empty( avia_get_option( ‘lightbox_active’ ) )

    It doesn’t like receiving a function’s returned value as the parameter for “empty”. It wants a variable, not a function.

    I’m thinking the resolve is by adding a new line of code above line 6:
    $var_lightbox_active = avia_get_option( ‘lightbox_active’);
    which stores the function’s returned value in a variable,

    And then modifying the code first mentioned above to read:
    empty( $var_lightbox_active )
    which uses our new variable instead of a function for the “empty” function’s parameter.

    Can you assist with this theme issue? Otherwise we will not be able to update the Theme when needed.

    #926783

    Hey,

    Sorry for the inconvenience! Issue occurs on servers running PHP versions older than 5.6. You can either upgrade your PHP version to minimum 5.6 and preferably to 7.x or replace /wp-content/themes/enfold/header.php file with this one – https://www.dropbox.com/s/r389b5x4ippscyn/header.php?dl=0 to bring up backwards compatibility with older PHP versions.

    Best regards,
    Yigit

    #926812

    Thank you Yigit. We’re going to update the header.php file for the moment.

    Thank you for your quick response!.

    #926815

    Hi,

    You are welcome! :)

    For your information, you can take a look at Enfold documentation here – http://kriesi.at/documentation/enfold/
    And if there are features that you wish Enfold had, you can request them and vote the requested ones here – https://kriesi.at/support/enfold-feature-requests/
    For any other questions or issues, feel free to start new threads under Enfold sub forum and we will gladly try to help you :)

    Best regards,
    Yigit

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘PHP Fatal error – Site Broken after Theme Update’ is closed to new replies.