[wp-trac] [WordPress Trac] #5651: Optimize get_plugin_data

WordPress Trac wp-trac at lists.automattic.com
Sat Jan 12 19:47:15 GMT 2008

#5651: Optimize get_plugin_data
 Reporter:  filosofo  |       Owner:  anonymous                       
     Type:  defect    |      Status:  new                             
 Priority:  normal    |   Milestone:  2.5                             
Component:  General   |     Version:  2.5                             
 Severity:  normal    |    Keywords:  has-patch get_plugin_data memory
 When get_plugin_data looks up the plugin's Author, URL, Description, etc.,
 it slurps in the entire plugin file, and runs 5 regexp matches against it.
 This seems to result in fatal errors for a number of people, as googling
 will show ![1].

 Instead, the get_plugin_data should check just the first 30 lines, as my
 attached patch does.

 ![1] Some examples of this fatal error in the wild:
  * http://wordpress.org/support/topic/150471
  * http://wordpress.org/support/topic/140340
  * http://wordpress.org/support/topic/143247
  * http://wordpress.org/support/topic/145806
  * http://wordpress.org/support/topic/146956#post-662559

  * http://www.ilfilosofo.com/forum/topic/103
  * http://support.revolutiontheme.com/viewtopic.php?p=1841

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

More information about the wp-trac mailing list