WP Marketing » Topic: Code appearing on WP Warning: array_search(); http://wpmarketing.org/forum/topic/code-appearing-on-wp-warning-array_search Wordpress for Internet and Affiliate Marketing en-US Mon, 09 Jul 2012 20:18:38 +0000 http://bbpress.org/?v=1.0.2 <![CDATA[Search]]> q http://wpmarketing.org/forum/search.php hanadaddy on "Code appearing on WP Warning: array_search();" http://wpmarketing.org/forum/topic/code-appearing-on-wp-warning-array_search#post-46 Thu, 29 Oct 2009 12:10:16 +0000 hanadaddy 46@http://wpmarketing.org/forum/ <p>Hello again,<br /> No this error is not (directly?) related to showing extra description within the object or script tags for the SEO purposes. But I can say that your Wordpress setup is not normal because <code>$wp_current_filter</code> variable should be available by Wordpress.</p> <p>If you have other problems please , describe them in detail with the screenshot image or URL.<br /> thank you </p> ajjjr on "Code appearing on WP Warning: array_search();" http://wpmarketing.org/forum/topic/code-appearing-on-wp-warning-array_search#post-45 Thu, 29 Oct 2009 10:02:33 +0000 ajjjr 45@http://wpmarketing.org/forum/ <p>Thank you. Your replacement code for line 174 has blocked the displayed error, but does that now mean that the description is not SEO compliant? </p> hanadaddy on "Code appearing on WP Warning: array_search();" http://wpmarketing.org/forum/topic/code-appearing-on-wp-warning-array_search#post-44 Thu, 29 Oct 2009 08:50:35 +0000 hanadaddy 44@http://wpmarketing.org/forum/ <p>Hello ajjjr</p> <p>I am not sure what's going on because this error has occurred due to the missing <code>$wp_current_filter</code> array. But it should not be.</p> <p>Just to block the error to show up , change line 174 <code>hana-flv-player.php</code> file.</p> <p>from</p> <pre>if ( array_search('get_the_excerpt',$wp_current_filter) !== FALSE ) { </pre> <p>to</p> <pre>if (is_array($wp_current_filter) &amp;&amp; array_search('get_the_excerpt',$wp_current_filter) !== FALSE ) { </pre> <p>It will at least hide the error code to show up. Let me know how this quick patch works for you. </p> ajjjr on "Code appearing on WP Warning: array_search();" http://wpmarketing.org/forum/topic/code-appearing-on-wp-warning-array_search#post-43 Thu, 29 Oct 2009 00:38:13 +0000 ajjjr 43@http://wpmarketing.org/forum/ <p>After installing the Hana-FLV-Player and adding my first video to a WordPress Blog the following message is received. Warning: array_search(): Wrong datatype for second argument in mywebsites.com/httpdocs/wp-content/plugins/hana-flv-player/hana-flv-player.php on line 174. I am substituting mywebsites.com for the actual Blog.<br /> I checked line 174 and also looked at my function.php's, searching for a possible content_limit issues. Even attempted the suggestion made to Kim regarding adding the following:<br /> global $wp_current_filter;<br /> array_push($wp_current_filter,'get_the_excerpt');<br /> But the code is still showing. </p>