Title: Warning: in_array() expects parameter 2 to be array, null given in&#8230;
Last modified: March 22, 2021

---

# Warning: in_array() expects parameter 2 to be array, null given in…

 *  Resolved [shamajay](https://wordpress.org/support/users/shamajay/)
 * (@shamajay)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/warning-in_array-expects-parameter-2-to-be-array-null-given-in-4/)
 * Hi,
 * I am seeing a banner with the same warning for an error on line 117 in the file
   wp-content/plugins/speed-booster-pack/includes/sbp-helpers.php. (see attached
   screenshot 1)
 * [Screenshot 1](https://imgur.com/umTUV6s)
 * The # of warnings (exactly the same text) seems to increase in number when certain
   settings are enabled in the Speed Booster Pack plugin. When reset to defaults
   the warning appears 3 times but increases depending on settings.
 * I went over the relevant code in the Github repository (line 117 in the wp-plugin
   file) and the code is identical. However, when I ran a difference checker some
   code present on Github seems to be missing from the wp plugin file. [(See Here)](https://www.diffchecker.com/yrMnRdcL)
 * I would highly appreciate any help you can provide regarding this issue.
    -  This topic was modified 5 years, 2 months ago by [shamajay](https://wordpress.org/support/users/shamajay/).
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fwarning-in_array-expects-parameter-2-to-be-array-null-given-in-4%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Thread Starter [shamajay](https://wordpress.org/support/users/shamajay/)
 * (@shamajay)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/warning-in_array-expects-parameter-2-to-be-array-null-given-in-4/#post-14220164)
 * Update – I was using the wrong version of the file in the Git repository. Please
   disregard the portion about relevant code. There are no differences in the code
   for 4.1.1 in GitHub or the one in my plugins folder, but the issue of the warning
   banner persists.
 *  Plugin Author [Optimocha](https://wordpress.org/support/users/optimocha/)
 * (@optimocha)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/warning-in_array-expects-parameter-2-to-be-array-null-given-in-4/#post-14228729)
 * Hey [@shamajay](https://wordpress.org/support/users/shamajay/),
 * We just released v4.1.3, can you confirm that you’re not getting these warnings
   anymore?

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

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

 * ![](https://ps.w.org/speed-booster-pack/assets/icon.svg?rev=2342732)
 * [Speed Booster Pack ⚡ PageSpeed Optimization Suite](https://wordpress.org/plugins/speed-booster-pack/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/speed-booster-pack/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/speed-booster-pack/)
 * [Active Topics](https://wordpress.org/support/plugin/speed-booster-pack/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/speed-booster-pack/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/speed-booster-pack/reviews/)

## Tags

 * [php-error](https://wordpress.org/support/topic-tag/php-error/)
 * [warning](https://wordpress.org/support/topic-tag/warning/)

 * 2 replies
 * 2 participants
 * Last reply from: [Optimocha](https://wordpress.org/support/users/optimocha/)
 * Last activity: [5 years, 2 months ago](https://wordpress.org/support/topic/warning-in_array-expects-parameter-2-to-be-array-null-given-in-4/#post-14228729)
 * Status: resolved