[wp-trac] [WordPress Trac] #11974: uninitialized variable causes "sorry, that file cannot be edited"

WordPress Trac wp-trac at lists.automattic.com
Thu Jan 21 22:28:24 UTC 2010


#11974: uninitialized variable causes "sorry, that file cannot be edited"
----------------------------+-----------------------------------------------
 Reporter:  cwgservices     |       Owner:                                                         
     Type:  defect (bug)    |      Status:  new                                                    
 Priority:  high            |   Milestone:  Unassigned                                             
Component:  Administration  |     Version:  2.9.1                                                  
 Severity:  normal          |    Keywords:  editor,theme-editor,plugin-editor,file cannot be edited
----------------------------+-----------------------------------------------
 This bug is present in both wp-admin/theme-editor.php and wp-admin/plugin-
 editor in version 2.9.1 of wordpress. Depending on what other plugins
 happen to be activated, i.e. what they happen to leave on the stack, there
 are times when any attempt to use the theme editor or plugin editor
 produces the error message. Deactivating a recently added plugin restores
 normal operation, but the bug is in the core rather than the plugin.

 The variable $file is not initialized yet it is tested; if it happens to
 be nonempty the error will occur. The error comes from the subsequent call
 to validate_file_for_edit().

 I am attaching the patched files that I am using until the core gets
 officially fixed. The changes are surrounded with comments including my
 initials (cwg). There is one patched section in each of the two files.

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


More information about the wp-trac mailing list