Hi there,
is it you, Cam? Are you the one who sent me mail today?
For all others:
I think that’s an issue with your PHP version.
Which PHP version are you using?
The point is the bracket notation for the array in line 57. Bracket notation was etablished with PHP 5.4. Since WordPress itself requires at least version 5.6 I strongly reccomend to update PHP on your server!
That’s my advice for the long run.
Establishing backwards compatibility to PHP 5.4 is no option for the plugin!
So to help you, we should hack the plugin together, so that it works for you.
For a first try, please replace line 57 with the following:
spl_autoload_register( array( ‘KdMfi’, ‘autoload’ ), true, true );
Does that help?
It’s a common misconception that core WordPress requires at least PHP 5.6 – that is actually the recommended version if you read this page:
https://ww.wp.xz.cn/about/requirements/
Developers just see “5.6” and don’t read further down:
“WordPress also works with PHP 5.2.4+ and MySQL 5.0+”
It should be noted that CentOS 6, which has 4 years of support left, ships with PHP 5.3.3 (bugs/security fixes are backported from later PHP releases, but new features aren’t). A standard WP 4.6.1 install on CentOS 6 works perfectly, but some third-party plugins are starting to ignore the 5.2.4 minimum PHP requirement and it looks like Multiple Featured Images is yet another one.
As it stands, I’ve had to hold back updates for Multiple Featured Images so that it stays on version 0.3 (which is compatible with PHP 5.3.3 if not even older PHP releases). And, no, it’s non-trivial to upgrade PHP beyond 5.3.3 on CentOS 6 (I used the IUS repo to attempt this, but it broke a fair number of sites). It woould be nice if Multiple Featured Images could be updated to support pre-PHP 5.4 releases – after all, it did do so before version 0.4 came out!
I tried your suggestion, but got:
Using $this when not in object context in /home/kahalcha/public_html/wp-content/plugins/multiple-featured-images/user_func/user_functions_deprecated.php on line 48.
The server I’m on is running PHP 5.3.29.
I’m talking to them to see if I can get 5.6.X.
Any other ideas/suggestions.
Many Thanks,
Mitch
Can I just roll back to 0.3 by replacing the code or have changes been made to the database that have to be undone to run the older code?
Thanks,
Mitch
Hi there,
compatibility to PHP 5.3 is now added in the new version 0.4.3.
Please update and check if it works again!
Thanks! I’ll try to check it out this weekend.