Title: Warning: in_array() expects parameter 2 to be array, string
Last modified: June 3, 2019

---

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

 *  Resolved [djalma81](https://wordpress.org/support/users/djalma81/)
 * (@djalma81)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/warning-in_array-expects-parameter-2-to-be-array-string/)
 * Hi,
 * Since the last update, I receive the following error
 * Warning: in_array() expects parameter 2 to be array, string … wp-content/plugins/
   shortcode-variables/includes/shortcode.user.php on line 58
 * I’ve the last version of WP and PHP 7.3 . I don’t use any cache system

Viewing 14 replies - 1 through 14 (of 14 total)

 *  Plugin Author [YeKen](https://wordpress.org/support/users/aliakro/)
 * (@aliakro)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/warning-in_array-expects-parameter-2-to-be-array-string/#post-11599070)
 * Oh that’s not good! I’ll have a look tonight and get a fix out!
 * Apologies!
 *  [nanetto2](https://wordpress.org/support/users/nanetto2/)
 * (@nanetto2)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/warning-in_array-expects-parameter-2-to-be-array-string/#post-11599278)
 * Me too…
 *  Plugin Author [YeKen](https://wordpress.org/support/users/aliakro/)
 * (@aliakro)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/warning-in_array-expects-parameter-2-to-be-array-string/#post-11599486)
 * 3.0.1 going out now! Sorry!
 * Can you let me know if it fixes it!
 *  Thread Starter [djalma81](https://wordpress.org/support/users/djalma81/)
 * (@djalma81)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/warning-in_array-expects-parameter-2-to-be-array-string/#post-11599816)
 * Working perfect now with version 3.0.1, Thanks Yeken
 *  Thread Starter [djalma81](https://wordpress.org/support/users/djalma81/)
 * (@djalma81)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/warning-in_array-expects-parameter-2-to-be-array-string/#post-11599818)
 * Problem solved
 *  Plugin Author [YeKen](https://wordpress.org/support/users/aliakro/)
 * (@aliakro)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/warning-in_array-expects-parameter-2-to-be-array-string/#post-11599908)
 * Great stuff! I’d love it if you could review the plugin 🙂
 * Cheers,
 * Al
 *  [inscape](https://wordpress.org/support/users/inscape/)
 * (@inscape)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/warning-in_array-expects-parameter-2-to-be-array-string/#post-11616890)
 * I am still getting this error with the latest 3.0.1 release when multiple shortcode
   variables are placed into a single HTML or Text widget. It was working fine with
   the previous version. Thanks for your work on this. I hope this issue can be 
   resolved.
 *  Plugin Author [YeKen](https://wordpress.org/support/users/aliakro/)
 * (@aliakro)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/warning-in_array-expects-parameter-2-to-be-array-string/#post-11617856)
 * Ah! Will look for you now.
 * Thanks for mentioning it!
 *  Plugin Author [YeKen](https://wordpress.org/support/users/aliakro/)
 * (@aliakro)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/warning-in_array-expects-parameter-2-to-be-array-string/#post-11618006)
 * That’s 3.0.2 out with a fix! Can you let me know if it works for you?
 * Cheers,
 * Al
 *  [inscape](https://wordpress.org/support/users/inscape/)
 * (@inscape)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/warning-in_array-expects-parameter-2-to-be-array-string/#post-11618724)
 * It works beautifully now. Thanks for the quick fix and for the fine plugin.
 *  [inscape](https://wordpress.org/support/users/inscape/)
 * (@inscape)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/warning-in_array-expects-parameter-2-to-be-array-string/#post-11618897)
 * Ahh, actually, I spoke too soon. It works as expected on the site’s main page(
   the posts page), but not on other pages. On other pages, when multiple shortcode
   variables are placed into a single HTML or Text widget the error persists. For
   the moment, I have reverted to version 2.4. Thanks again for looking into it.
 * Best,
    Mike
 *  Plugin Author [YeKen](https://wordpress.org/support/users/aliakro/)
 * (@aliakro)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/warning-in_array-expects-parameter-2-to-be-array-string/#post-11620583)
 * Ah no! Can’t get the staff these days!
 * Apologies. I’ve removed the block of code together now! Hopefully 3.0.3 is the
   fix.
 * Please let me know!
 * Al
 *  [inscape](https://wordpress.org/support/users/inscape/)
 * (@inscape)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/warning-in_array-expects-parameter-2-to-be-array-string/#post-11623206)
 * It looks like the problem is solved this time. Thanks so much for your prompt
   attention and a great plugin.
 * Mike
 *  Plugin Author [YeKen](https://wordpress.org/support/users/aliakro/)
 * (@aliakro)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/warning-in_array-expects-parameter-2-to-be-array-string/#post-11623219)
 * Glad to hear it!
 * Please feel free to review the plugin! 🙂

Viewing 14 replies - 1 through 14 (of 14 total)

The topic ‘Warning: in_array() expects parameter 2 to be array, string’ is closed
to new replies.

 * ![](https://ps.w.org/shortcode-variables/assets/icon-256x256.png?rev=2402961)
 * [Snippet Shortcodes](https://wordpress.org/plugins/shortcode-variables/)
 * [Support Threads](https://wordpress.org/support/plugin/shortcode-variables/)
 * [Active Topics](https://wordpress.org/support/plugin/shortcode-variables/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/shortcode-variables/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/shortcode-variables/reviews/)

 * 14 replies
 * 4 participants
 * Last reply from: [YeKen](https://wordpress.org/support/users/aliakro/)
 * Last activity: [6 years, 11 months ago](https://wordpress.org/support/topic/warning-in_array-expects-parameter-2-to-be-array-string/#post-11623219)
 * Status: resolved