Title: Array argument error
Last modified: April 2, 2018

---

# Array argument error

 *  [Zoinks! Graphics](https://wordpress.org/support/users/zoinks/)
 * (@zoinks)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/array-argument-error/)
 * My PHP logs are showing many instances of this error: “Warning: array_merge():
   Argument #2 is not an array /MY/WORDPRESS/PATH/wp-content/plugins/admin-global-
   search/index.php on line 50”
 * So I changed the following code at line 50 of the plugin’s index.php…
 * `$aVars = $aOpts ? array_merge($aParams,$aOpts) : $aParams;`
 * …to…
 * `$aVars = is_array($aOpts) ? array_merge($aParams,$aOpts) : $aParams;`
 * That seems to have cleared it up, so feel free to use this in the next plugin
   update! (hopefully soon)

The topic ‘Array argument error’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/admin-global-search.svg)
 * [Admin Global Search](https://wordpress.org/plugins/admin-global-search/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/admin-global-search/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/admin-global-search/)
 * [Active Topics](https://wordpress.org/support/plugin/admin-global-search/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/admin-global-search/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/admin-global-search/reviews/)

## Tags

 * [array](https://wordpress.org/support/topic-tag/array/)
 * [array_merge](https://wordpress.org/support/topic-tag/array_merge/)

 * 0 replies
 * 1 participant
 * Last reply from: [Zoinks! Graphics](https://wordpress.org/support/users/zoinks/)
 * Last activity: [8 years, 2 months ago](https://wordpress.org/support/topic/array-argument-error/)
 * Status: not resolved