{"id":15469199,"date":"2022-03-17T15:59:08","date_gmt":"2022-03-17T15:59:08","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/errorexception-json_decode-expects-parameter-1-to-be-string\/"},"modified":"2022-03-17T15:59:08","modified_gmt":"2022-03-17T15:59:08","slug":"errorexception-json_decode-expects-parameter-1-to-be-string","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/errorexception-json_decode-expects-parameter-1-to-be-string\/","title":{"rendered":"ErrorException: &#8220;json_decode() expects parameter 1 to be string"},"content":{"rendered":"<p>I&#8217;m receiving the following error with AIOSEO when accessing the AIO Settings page or a CPT page in admin:<\/p>\n<pre><code>\n\/Users\/***\/wp-content\/plugins\/all-in-one-seo-pack\/app\/Common\/Traits\/Helpers\/Vue.php 135\n\nErrorException thrown with message &quot;json_decode() expects parameter 1 to be string, array given&quot;\n<\/code><\/pre>\n<p>The line referred to in the error is:<\/p>\n<p><code>&#039;helpPanel&#039;        =&gt; json_decode( aioseo()-&gt;help-&gt;getDocs() ),<\/code><\/p>\n<p>The <code>getDocs()<\/code> call is sending an array to <code>json_decode<\/code> instead of a string.<\/p>\n<p>This is occurring with WP_DEBUG enabled and WP_ENVIRONMENT_TYPE set to either &#8216;local&#8217; or &#8216;staging&#8217;. The local environment uses valet and staging is a WHM\/cPanel server. The only way to get around it is to disable WP_DEBUG. I have seen this occur on multiple sites.<\/p>\n","protected":false},"template":"","class_list":["post-15469199","topic","type-topic","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/15469199","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\/15469199\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=15469199"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}