{"id":10138849,"date":"2018-04-02T17:38:33","date_gmt":"2018-04-02T17:38:33","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/array-argument-error\/"},"modified":"2018-04-02T17:38:33","modified_gmt":"2018-04-02T17:38:33","slug":"array-argument-error","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/array-argument-error\/","title":{"rendered":"Array argument error"},"content":{"rendered":"<p>My PHP logs are showing many instances of this error: &#8220;Warning: array_merge(): Argument #2 is not an array \/MY\/WORDPRESS\/PATH\/wp-content\/plugins\/admin-global-search\/index.php on line 50&#8221;<\/p>\n<p>So I changed the following code at line 50 of the plugin&#8217;s index.php&#8230;<\/p>\n<p><code>$aVars = $aOpts ? array_merge($aParams,$aOpts) : $aParams;<\/code><\/p>\n<p>&#8230;to&#8230;<\/p>\n<p><code>$aVars = is_array($aOpts) ? array_merge($aParams,$aOpts) : $aParams;<\/code><\/p>\n<p>That seems to have cleared it up, so feel free to use this in the next plugin update! (hopefully soon)<\/p>\n","protected":false},"template":"","class_list":["post-10138849","topic","type-topic","status-publish","hentry","topic-tag-array","topic-tag-array_merge"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/10138849","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/10138849\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=10138849"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}