- This topic has 2 replies, 2 voices, and was last updated 8 years, 8 months ago by .
Viewing 3 posts - 1 through 3 (of 3 total)
Viewing 3 posts - 1 through 3 (of 3 total)
- The forum ‘WTI Like Post PRO’ is closed to new topics and replies.
Home › Forums › WTI Like Post PRO › PHP error message: in_array() expects parameter 2 to be array…
Hi,
Great plugin, love it.
I get repeatedly the following error messages, is there a chance it comes from the plugin?
PHP Warning: in_array() expects parameter 2 to be array, integer given in /wp-content/plugins/wti-like-post-pro/wti-like-post-widgets.php on line 160
PHP Warning: in_array() expects parameter 2 to be array, string given in /wp-content/plugins/wti-like-post-pro/wti-like-post-widgets.php on line 160
Wordpress version: 4.4.2
Plugin: WTI Like Post PRO 2.2
We did not find this issue at our end. However you can change the code as suggested below which will fix the above warning message. Open the above file using any text editor and just above the mentioned line, please add the following piece of code:
if (!is_array($instance['category'])) {
$instance['category'] = (array) $instance['category'];
}
This should work. Please let us know.
Thanks
Just added the piece of code, will let you know if the error shows up again.
Thanks!