Hi Malcolm, sorry the update is giving you trouble.
Can you tell me what PHP version you are using?
Even better would be if you have a PHP error log set up, I’d be very interested to know the error you’re getting.
Hi,
PHP 5.3.10
Following error in Logs
[Sun Nov 27 17:16:12 2016] [warn] [client 86.191.240.109] mod_fcgid: stderr: PHP Parse error: syntax error, unexpected ‘[‘ in /var/www/vhosts/summerstars.co.uk/httpdocs/wp-content/plugins/participants-database/classes/PDb_List_Admin.class.php on line 357, referer: http://summerstars.co.uk/wp-admin/admin.php?page=participants-database
OK, I made a mistake, that syntax requires PHP 5.4 or better. If you are running PHP 5.4 or later, you don’t need to do this.
Here is the fix:
In the plugin file classes/PDb_List_Admin.class.php on line 357, you’ll find:
) )['pid'] );
Remove the part with the brackets so that it looks like this:
) ) );
Now, below that, add a new line and put this in there:
$selected_ids = $selected_ids['pid'];
That’s it…just so the change is clear here is the fixed code from 352 to 358:
$selected_ids = Participants_Db::apply_filters( 'before_list_admin_with_selected_action', filter_input_array( INPUT_POST, array(
'pid' => array(
'filter' => FILTER_VALIDATE_INT,
'flags' => FILTER_REQUIRE_ARRAY,
)
) ) );
$selected_ids = $selected_ids['pid'];
Thanks for that – I have taken the opportunity to upgrade php for this particular site. Just have to remember to check the version when I move it to its live domain.
How do I mark this topic as resolved?
Many thanks
-
This reply was modified 9 years, 6 months ago by
mdhills.
I’ll be releasing Participants Database 1.7.1.1 soon, this will be fixed in that release.