Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #467438

    Yeah, I know… PHP 7 alpha release. But FYI: Enfold reports a PHP Fatal error in enfold\framework\php\class-style-generator.php on line 123:

    [02-Jul-2015 08:37:30 UTC] PHP Fatal error:  Uncaught Error: Function name must be a string in D:\www\saotn.org\www\wp-content\themes\enfold\framework\php\class-style-generator.php:123
    Stack trace:
    #0 D:\www\saotn.org\www\wp-includes\plugin.php(503): avia_style_generator->create_styles('')
    #1 D:\www\saotn.org\www\wp-includes\general-template.php(2271): do_action('wp_head')
    #2 D:\www\saotn.org\www\wp-content\themes\enfold\header.php(50): wp_head()
    #3 D:\www\saotn.org\www\wp-includes\template.php(537): require_once('D:\\www\\saotn.or...')
    #4 D:\www\saotn.org\www\wp-includes\template.php(496): load_template('D:\\www\\saotn.or...', true)
    #5 D:\www\saotn.org\www\wp-includes\general-template.php(45): locate_template(Array, true)
    #6 D:\www\saotn.org\www\wp-content\themes\enfold\tag.php(7): get_header()
    #7 D:\www\saotn.org\www\wp-includes\template-loader.php(75): include('D:\\www\\saotn.or...')
    #8 D:\www\saotn.org\www\wp-blog-header.php(16): require_once('D:\\www\\saotn.or...')
    #9 D:\www\saotn.org\www\index.php(17): require('D:\\www\\saotn.or...')
    #10 {main}
       in D:\www\saotn.org\www\wp-content\themes\enfold\framework\php\class-style-generator.php on line 123
    

    Enfold debugging information:

    Theme: Enfold
    Version: 3.1.5
    Installed: enfold
    AviaFramework Version: 2.2
    AviaBuilder Version: 0.8
    ML:256-PU:7-PLA:9
    WP:4.3-alpha-33039
    Updates: enabled

    I’ll try to fix the bugs myself as they come, but I’m lacking the available time at the moment.

    #467440

    Hi jan_reilink!

    Please update to latest enfold version, as it seems you are not, and then let us know if the error is still there.

    Best regards,
    Basilis

    #467460

    Thanks for your prompt reply Basilis!

    Strangely enough, Enfold didn’t notice me of an available update. Anyway, I updated to 3.2 and the PHP Fatal error persists:

    [02-Jul-2015 11:04:33 UTC] PHP Fatal error:  Uncaught Error: Function name must be a string in D:\www\saotn.org\www\wp-content\themes\enfold\framework\php\class-style-generator.php:123
    Stack trace:
    #0 D:\www\saotn.org\www\wp-includes\plugin.php(503): avia_style_generator->create_styles('')
    #1 D:\www\saotn.org\www\wp-includes\general-template.php(2271): do_action('wp_head')
    #2 D:\www\saotn.org\www\wp-content\themes\enfold\header.php(49): wp_head()
    #3 D:\www\saotn.org\www\wp-includes\template.php(537): require_once('D:\\www\\saotn.or...')
    #4 D:\www\saotn.org\www\wp-includes\template.php(496): load_template('D:\\www\\saotn.or...', true)
    #5 D:\www\saotn.org\www\wp-includes\general-template.php(45): locate_template(Array, true)
    #6 D:\www\saotn.org\www\wp-content\themes\enfold\single.php(7): get_header()
    #7 D:\www\saotn.org\www\wp-includes\template-loader.php(75): include('D:\\www\\saotn.or...')
    #8 D:\www\saotn.org\www\wp-blog-header.php(16): require_once('D:\\www\\saotn.or...')
    #9 D:\www\saotn.org\www\index.php(17): require('D:\\www\\saotn.or...')
    #10 {main} in D:\www\saotn.org\www\wp-content\themes\enfold\framework\php\class-style-generator.php on line 123

    This post/bug report is mostly an FYI, since PHP 7 is coming soon and Enfold doesn’t seems ready for it. It’ll be nice to have it fixed “now”, but not necessary. I’ve reverted back to PHP 5.5 (due to a bug in WinCache for PHP 5.6). I’m more than happy to provide more debug information if needed.

    Debugging Info for Theme support: 
    
    Theme: Enfold
    Version: 3.2
    Installed: enfold
    AviaFramework Version: 2.2
    AviaBuilder Version: 0.8
    ML:256-PU:14-PLA:9
    WP:4.3-alpha-33039
    Updates: enabled
    #468031

    Hey!

    As far as I know, Enfold has not even been tested with PHP7 yet so there is no support for it as of now.

    Best regards,
    Rikard

    #468052

    No problem Rikard, I’ll try to fix errors myself as they show up. However, it’s time to start working on compatibility; PHP 7 is coming soon (October, November 2015). I expect a lot of users want to jump on it as soon as it arrives, because of the performance improvements.

    #468331

    Hi!

    Thanks for the feedback, Kriesi is aware of it and I’m sure we’ll be compatible once PHP 7 is launched.

    Cheers!
    Rikard

    #539056

    For what it’s worth, running PHP 7.0.0RC6 now and Enfold version 3.4.1, it still gives me the PHP Error:

    Fatal error: Uncaught Error: Function name must be a string in D:\www\saotn.org\www-secure\wp-content\themes\enfold\framework\php\class-style-generator.php:123
    Stack trace:
    #0 D:\www\saotn.org\www-secure\wp-includes\plugin.php(525): avia_style_generator->create_styles('')
    #1 D:\www\saotn.org\www-secure\wp-includes\general-template.php(2434): do_action('wp_head')
    #2 D:\www\saotn.org\www-secure\wp-content\themes\enfold\header.php(51): wp_head()
    #3 D:\www\saotn.org\www-secure\wp-includes\template.php(562): require_once('D:\\www\\saotn.or...')
    #4 D:\www\saotn.org\www-secure\wp-includes\template.php(521): load_template('D:\\www\\saotn.or...', true)
    #5 D:\www\saotn.org\www-secure\wp-includes\general-template.php(45): locate_template(Array, true)
    #6 D:\www\saotn.org\www-secure\wp-content\themes\enfold\index.php(9): get_header()
    #7 D:\www\saotn.org\www-secure\wp-includes\template-loader.php(89): include('D:\\www\\saotn.or...')
    #8 D:\www\saotn.org\www-secure\wp-blog-header.php(16): require_once('D:\\www\\saotn.or...')
    #9 D:\www\sa in D:\www\saotn.org\www-secure\wp-content\themes\enfold\framework\php\class-style-generator.php on line 123

    I believe to have fixed this by changing

    $this->output .= $this->$rule['key']($rule)."\n";
    to

    $this->output .= $this->$rule['key'][$rule]."\n";

    ( changed () to [] on line 123 of enfold\framework\php\class-style-generator.php ). Not sure this is the right fix, but PHP no longer reports errors when I have error_reporting enabled.

    #539061
    #539063

    LOL thanks! There was no mention of any PHP7 fixes on Facebook (I know, I replied…)
    Will give it a go as soon as possible, unfortunately I’m not able to apply the update today.

    #539068

    Hey!

    Sure, we will keep the thread open and wait to hear from you. Thread will be on hold until you reply :)

    Regards,
    Yigit

    #545266

    To fix this issues you would not change
    $this->output .= $this->$rule[‘key’]($rule).”\n”;
    to
    $this->output .= $this->$rule[‘key’][$rule].”\n”;

    rather you would change
    $this->output .= $this->$rule[‘key’]($rule).”\n”;
    to
    $this->output .= $this->{ $rule[‘key’] } ($rule).”\n”;

    The first options changes the meaning of enfold’s code and can cause more problems. The problem that php7 is that it is evaulating the following phrase $this->$rule[‘key’]($rule) as $this->{$rule}[”key’] instead of $this->{ $rule[‘key’] }. The curly braces define the order of evaluation. So putting curly braces around the statement $rule[‘key’] will force php the use the string instance instead of the whole array.

    #545277

    Hey!


    @louisvillegeek
    Thanks for your input!

    Cheers!
    Yigit

Viewing 12 posts - 1 through 12 (of 12 total)
  • You must be logged in to reply to this topic.