pfefferle / wordpress-semantic-linkbacks

More meaningfull linkbacks
https://wordpress.org/plugins/semantic-linkbacks
MIT License
31 stars 18 forks source link

Warning: in_array() expects parameter 2 to be array #196

Closed colin-walker closed 4 years ago

colin-walker commented 6 years ago

With WP_DEBUG set to true I get the following when listing comments:

Warning: in_array() expects parameter 2 to be array, string given in {path to}/class-linkbacks-walker-comment.php on line 25

colin-walker commented 6 years ago

This error (and a similar error in semantic-linkbacks.php line 97) occurs when all facepile options are deselected.

I’ve worked around it by checking if $facepiles is a string and if so setting $facepiles[0] = $facepiles

Doesn’t do anything and the error doesn’t cause any impact (it’s only visible with wp_debug =true) but at least the error goes away ;)

pfefferle commented 6 years ago

Should be fixed with #192

Will rollout an update later today.

colin-walker commented 6 years ago

Thanks.

nicolascluz commented 6 years ago

I add these lines in my .use.ini and now it works

mbstring.language = all mbstring.internal_encoding = UTF-8 mbstring.http_input = auto mbstring.http_output = UTF-8 mbstring.encoding_translation = On mbstring.detect_order = UTF-8 mbstring.substitute_character = none; mbstring.func_overload = 0 mbstring.strict_encoding = Off

edent commented 4 years ago

This still seems to be a problem. My logfiles are full of:


PHP Warning:  in_array() expects parameter 2 to be array, string given in blog/wp-content/plugins/semantic-linkbacks/templates/linkbacks.php on line 2
PHP Warning:  in_array() expects parameter 2 to be array, string given in blog/wp-content/plugins/semantic-linkbacks/templates/linkbacks.php on line 16
PHP Warning:  in_array() expects parameter 2 to be array, string given in blog/wp-content/plugins/semantic-linkbacks/templates/linkbacks.php on line 30
PHP Warning:  in_array() expects parameter 2 to be array, string given in blog/wp-content/plugins/semantic-linkbacks/templates/linkbacks.php on line 44
PHP Warning:  in_array() expects parameter 2 to be array, string given in blog/wp-content/plugins/semantic-linkbacks/templates/linkbacks.php on line 58
PHP Warning:  in_array() expects parameter 2 to be array, string given in blog/wp-content/plugins/semantic-linkbacks/templates/linkbacks.php on line 72
PHP Warning:  in_array() expects parameter 2 to be array, string given in blog/wp-content/plugins/semantic-linkbacks/templates/linkbacks.php on line 86
PHP Warning:  in_array() expects parameter 2 to be array, string given in blog/wp-content/plugins/semantic-linkbacks/templates/linkbacks.php on line 100
PHP Warning:  in_array() expects parameter 2 to be array, string given in blog/wp-content/plugins/semantic-linkbacks/templates/linkbacks.php on line 114
PHP Warning:  in_array() expects parameter 2 to be array, string given in blog/wp-content/plugins/semantic-linkbacks/templates/linkbacks.php on line 128
PHP Warning:  in_array() expects parameter 2 to be array, string given in blog/wp-content/plugins/semantic-linkbacks/templates/linkbacks.php on line 144
PHP Warning:  in_array() expects parameter 2 to be array, string given in blog/wp-content/plugins/semantic-linkbacks/templates/linkbacks.php on line 210
colin-walker commented 4 years ago

Have you unticked all of the facepiles options? I still don't think it's handling that correctly.

edent commented 4 years ago

I don't have facepiles enabled at all. And the "Initial number" is set to 0.