[wp-trac] [WordPress Trac] #11712: Theme Editor -> "Sorry, that file cannot be edited."

WordPress Trac wp-trac at lists.automattic.com
Tue Jan 5 00:52:35 UTC 2010


#11712: Theme Editor -> "Sorry, that file cannot be edited."
-------------------------+--------------------------------------------------
 Reporter:  Frumph       |        Owner:          
     Type:  enhancement  |       Status:  reopened
 Priority:  normal       |    Milestone:  3.0     
Component:  Filesystem   |      Version:          
 Severity:  normal       |   Resolution:          
 Keywords:               |  
-------------------------+--------------------------------------------------

Comment(by Frumph):

 {{{
         if (':' == substr( $file, 1, 1 ))
                 return 2;
 }}}
 Note that it's currently checking $file, while file is string(29)
 "/themes/comicpress/footer.php"

 thats why it's returning 3 because it actually stop ahead of that line at
 this:

 {{{
         if (!empty ( $allowed_files ) && (!in_array( $file, $allowed_files
 ) ) )
                 return 3;
 }}}

 which is actually before the return 2 in the function validate_file

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/11712#comment:7>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list