[wp-trac] [WordPress Trac] #12078: Warning : in_array Invalid argument in wp-includes/post.php on line 1997

WordPress Trac wp-trac at lists.automattic.com
Fri Jan 29 13:32:51 UTC 2010


#12078: Warning : in_array Invalid argument in wp-includes/post.php on line 1997
--------------------------+-------------------------------------------------
 Reporter:  firebird75    |       Owner:            
     Type:  defect (bug)  |      Status:  new       
 Priority:  normal        |   Milestone:  Unassigned
Component:  General       |     Version:  2.9.1     
 Severity:  normal        |    Keywords:            
--------------------------+-------------------------------------------------
 Hello,

 I am receiving a warning while publishing a new post through the post by
 email feature.

 The warning states that the second argument is invalid in wp-
 includes/post.php on line 1997.

 Here is the code :
 if ( $post_name_check || in_array($slug, $wp_rewrite->feeds) ) {

 If I modify this line to this :
 if ( $post_name_check || in_array($slug, $feeds) ) {

 Then the warning goes away. I am not sure however about the implications
 around this change.

 Please note that you may not see this error by using the post by email
 feature as I am reusing the code as part of the plugin to allow custom
 post types submission by email but the code is the same, it is just the
 way I call it that is different. Instead of requiring the direct call to
 wp-mail.php, I have created a function which contains the code of wp-
 mail.php as part of my plugin.

 The plugin in question is WATS (wordpress advanced ticket system).

 The problem can be reproduced with any kind of email received (plain text,
 html, etc...).

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/12078>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list