PHP Catchable fatal error: WP_Error could not be converted to string
-
Since we updated to 4.0.0 when non-logged-in users submit a comment, they just see an error message and the comment will not be posted.
PHP log:
PHP Catchable fatal error: Object of class WP_Error could not be converted to string in /var/www/web_1712_1/htdocs/live/wp-content/plugins/wp-ulike/inc/general-functions.php on line 1864We did a var_dump($num) on line 1864 and got:
object(WP_Error)#12449 (2) { ["errors"]=> array(1) { ["broke"]=> array(1) { [0]=> string(47) "Please enter some value for required variables." } } ["error_data"]=> array(0) { } }So our temporary workaround was:
if (is_a($num, "WP_Error")) { $value = ''; } else { $value = $num . $sign; }The page I need help with: [log in to see the link]
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘PHP Catchable fatal error: WP_Error could not be converted to string’ is closed to new replies.