[wp-trac] [WordPress Trac] #7530: update_postmeta_cache fails while create new posts

WordPress Trac wp-trac at lists.automattic.com
Sat Aug 16 13:11:40 GMT 2008


#7530: update_postmeta_cache fails while create new posts
---------------------+------------------------------------------------------
 Reporter:  so1o     |       Owner:  anonymous
     Type:  defect   |      Status:  new      
 Priority:  normal   |   Milestone:  2.7      
Component:  General  |     Version:           
 Severity:  normal   |    Keywords:           
---------------------+------------------------------------------------------
 when a new post is created but not saved, the regex fails because the post
 id is negative at that point..

 {{{
 preg_replace('|[^0-9,]|', '', $post_ids);
 }}}

 needs to be changed to

 {{{
 preg_replace('|[^0-9,-]|', '', $post_ids);
 }}}

 or needs to be filtered as

 {{{
 preg_replace(apply_filters('update_postmeta_cache_regex','|[^0-9,]|'), '',
 $post_ids);
 }}}

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


More information about the wp-trac mailing list