[wp-trac] [WordPress Trac] #10525: post.php suppressed E_WARNING

WordPress Trac wp-trac at lists.automattic.com
Fri Jul 31 21:33:47 UTC 2009


#10525: post.php suppressed E_WARNING
--------------------------+-------------------------------------------------
 Reporter:  Mittineague   |       Owner:            
     Type:  defect (bug)  |      Status:  new       
 Priority:  low           |   Milestone:  Unassigned
Component:  Autosave      |     Version:            
 Severity:  minor         |    Keywords:            
--------------------------+-------------------------------------------------
 Using the Error Reporting plugin I get

 E_WARNING
 Couldn't find constant DOING_AUTOSAVE
 at ...../wp-includes/post.php (3471)

 {{{
 function wp_save_post_revision( $post_id ) {
         // We do autosaves manually with wp_create_post_autosave()
         if ( @constant( 'DOING_AUTOSAVE' ) )
                 return;
 }}}

 Would it not be easy enough to do a defined() before the constant() and
 eliminate the need for suppression?

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


More information about the wp-trac mailing list