Notifications
Clear all

wpForo 1.x.x [Closed] Warning Signs

3 Posts
3 Users
0 Likes
1,582 Views
Posts: 1
Topic starter
(@mellxx)
New Member
Joined: 6 years ago

Hi , could you help me please !  In settings - members - update options .

This warning is come up :

Warning: Illegal string offset 'rating' in /homepages/16/d725977855/htdocs/app739558366/wp-content/plugins/wpforo/wpf-includes/wpf-actions.php on line 472

Warning: Invalid argument supplied for foreach() in /homepages/16/d725977855/htdocs/app739558366/wp-content/plugins/wpforo/wpf-includes/wpf-actions.php on line 472

Warning: Cannot modify header information - headers already sent by (output started at /homepages/16/d725977855/htdocs/app739558366/wp-content/plugins/wpforo/wpf-includes/wpf-actions.php:472) in /homepages/16/d725977855/htdocs/app739558366/wp-includes/pluggable.php on line 1216

Thank you

2 Replies
Sofy
Posts: 4310
 Sofy
Admin
(@sofy)
Support Team
Joined: 6 years ago

Hi mellxx,

Thank you for letting us know, we'll check and fix it as soon as possible. 

Robert
Posts: 10503
Admin
(@robert)
Support Team
Joined: 8 years ago

This is already fixed in next version.

Please do this change in core file if you need to fix it as soon as possible. Install WP Editor plugin (please don't use WordPress native plugin editor). Navigate to Dashboard > Plugins > Editor. Select wpForo plugin. open the Find and open the /wpforo/wpf-includes/wpf-actions.php file. And find this code (line 472):

foreach($_POST['wpforo_member_options']['default_title']['rating'] as $key => $subArray){
       $_POST['wpforo_member_options']['default_title']['rating'][$key] = array_map('sanitize_text_field', $subArray);
}

Change it to this:

foreach($_POST['wpforo_member_options']['rating'] as $key => $rating){
$_POST['wpforo_member_options']['rating'][$key] = array_map('sanitize_text_field', $rating);
$_POST['wpforo_member_options']['rating'][$key]['points'] = intval($rating['points']);
}

And save it. then deactivate and delete the WP Editor plugin, if you don't need it anymore.