Tagged: 

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #922917

    I get this error after upgrading to the latest version of Enfold:

    Fatal error: Can’t use function return value in write context in /home/abbeyroadrodney/public_html/wp-content/themes/enfold/header.php on line 6

    What should I do?

    #922930

    PS I have uploaded the previous version of header.php which has at least got the website up and running.

    This is the difference between the two files:

    `<?php
    if ( ! defined(‘ABSPATH’) ){ die(); }

    global $avia_config;

    $avia_config[‘use_standard_lightbox’] = empty( avia_get_option( ‘lightbox_active’ ) ) || ( ‘lightbox_active’ == avia_get_option( ‘lightbox_active’ ) ) ? ‘lightbox_active’ : ‘disabled’;
    /**
    * Allow to overwrite the option setting for using the standard lightbox
    * Make sure to return ‘disabled’ to deactivate the standard lightbox – all checks are done against this string
    *
    * @added_by Günter
    * @since 4.2.6
    * @param string $use_standard_lightbox ‘lightbox_active’ | ‘disabled’
    * @return string ‘lightbox_active’ | ‘disabled’
    */
    $avia_config[‘use_standard_lightbox’] = apply_filters( ‘avf_use_standard_lightbox’, $avia_config[‘use_standard_lightbox’] );

    $style = $avia_config[‘box_class’];
    $responsive = avia_get_option(‘responsive_active’) != “disabled” ? “responsive” : “fixed_layout”;
    $blank = isset($avia_config[‘template’]) ? $avia_config[‘template’] : “”;
    $av_lightbox = $avia_config[‘use_standard_lightbox’] != “disabled” ? ‘av-default-lightbox’ : ‘av-custom-lightbox’;
    $preloader = avia_get_option(‘preloader’) == “preloader” ? ‘av-preloader-active av-preloader-enabled’ : ‘av-preloader-disabled’;
    $sidebar_styling = avia_get_option(‘sidebar_styling’);
    $filterable_classes = avia_header_class_filter( avia_header_class_string() );
    $av_classes_manually = “av-no-preview”; /*required for live previews*/
    $av_classes_manually .= avia_is_burger_menu() ? ” html_burger_menu_active” : ” html_text_menu_active”;

    ?><!DOCTYPE html>

    #922937

    Hey,

    Please upgrade PHP version to minimum 5.6 or replace the content of header.php file with this one – https://pastebin.com/yp2fxsaz

    Cheers!
    Yigit

    #922945

    Thank you. Pasting this into the header.php file has fixed the problem.

    PHP version 7.1 appears to be available on the server is this ok to go the whole hog now?

    #922989

    Hi ColinWalton,

    Well, it is better to upgrade anyway and since you’re at it now, might as well do it.
    https://kinsta.com/blog/php-7-hhvm-benchmarks/

    If you need further assistance please let us know.
    Best regards,
    Victoria

    #922992

    Ok thanks. Will go the whole hog then.

    C x

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Fatal error: Can't use function return value…. /enfold/header.php on line 6’ is closed to new replies.