-
AuthorPosts
-
July 2, 2015 at 12:19 pm #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.
July 2, 2015 at 12:23 pm #467440Hi 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,
BasilisJuly 2, 2015 at 1:10 pm #467460Thanks 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
July 3, 2015 at 3:01 pm #468031Hey!
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,
RikardJuly 3, 2015 at 3:18 pm #468052No 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.
July 4, 2015 at 8:03 am #468331Hi!
Thanks for the feedback, Kriesi is aware of it and I’m sure we’ll be compatible once PHP 7 is launched.
Cheers!
RikardNovember 19, 2015 at 3:38 pm #539056For 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.
- This reply was modified 9 years ago by jan_reilink.
November 19, 2015 at 3:41 pm #539061Hey!
Please update Enfold to the latest version – http://kriesi.at/documentation/enfold/updating-your-theme-files/
http://themeforest.net/item/enfold-responsive-multipurpose-theme/4519990#item-description__changelog :)Best regards,
YigitNovember 19, 2015 at 3:43 pm #539063LOL 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.November 19, 2015 at 3:47 pm #539068Hey!
Sure, we will keep the thread open and wait to hear from you. Thread will be on hold until you reply :)
Regards,
YigitDecember 1, 2015 at 3:29 pm #545266To 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.
December 1, 2015 at 3:34 pm #545277 -
AuthorPosts
- You must be logged in to reply to this topic.