Home Forums WTI Like Post PRO PHP error message: in_array() expects parameter 2 to be array…

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #420
    bdouxx
    Participant

    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

    #421
    Webtechideas
    Keymaster

    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

    #422
    bdouxx
    Participant

    Just added the piece of code, will let you know if the error shows up again.

    Thanks!

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘WTI Like Post PRO’ is closed to new topics and replies.