[wp-trac] [WordPress Trac] #10623: wp_kses_decode_entities() calls create_function() each time called

WordPress Trac wp-trac at lists.automattic.com
Sun Aug 16 05:28:09 UTC 2009


#10623: wp_kses_decode_entities() calls create_function() each time called
--------------------------+-------------------------------------------------
 Reporter:  mdawaffe      |       Owner:                  
     Type:  defect (bug)  |      Status:  new             
 Priority:  normal        |   Milestone:  Unassigned      
Component:  Optimization  |     Version:  2.9             
 Severity:  normal        |    Keywords:  has-patch commit
--------------------------+-------------------------------------------------
 Every time wp_kses_decode_entities() is called, create_function() is
 called twice.

 wp_kses_decode_entities() is called at least once in most KSES calls and
 once in all clean_url() calls.  This can result in hundreds of
 create_function()s on normal pages and thousands on edge pages.

 All these create_function()s eat up memory, which can, in edge cases,
 cause a fatal memory allocation error.

 Since these create_function() calls are not used to generate actual
 dynamic code, there's no reason they cannot be replaced with hardcoded
 functions.

 Attached.

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


More information about the wp-trac mailing list