PHP Notice: Array to string conversion
-
Hi!
I get this PHP notice:
PHP Notice: Array to string conversion in /wp-content/themes/hueman/functions.php on line 297This error has already been reported here:
https://wordpress.org/support/topic/social-link-target?replies=2It happens only when a social link get the
_blanktarget.$item['social-target']is an array when it must be a string.In my opinion, the wrong way to fix it would be to replace $item[‘social-target’] by $item[‘social-target’][0] on this line.
Indeed, this same variable is passed to the function icl_t at line 152 of ot-functions.php. This function is used to translate the string (when a multilingual plugin is activated) and of course, we can’t translate an array. This is a source conflict reported several times on the Polylang forum.
https://wordpress.org/support/topic/help-with-error-message-5?replies=5
https://wordpress.org/support/topic/incompatibility-with-hueman-theme?replies=4
The topic ‘PHP Notice: Array to string conversion’ is closed to new replies.
