[wp-trac] [WordPress Trac] #6936: upgrade process fails with WP_User_Search class not found error if __autoload defined

WordPress Trac wp-trac at lists.automattic.com
Thu May 8 14:22:58 GMT 2008


#6936: upgrade process fails with WP_User_Search class not found error if
__autoload defined
-----------------------------+----------------------------------------------
 Reporter:  ithinkihaveacat  |       Owner:  anonymous
     Type:  defect           |      Status:  new      
 Priority:  normal           |   Milestone:           
Component:  Administration   |     Version:  2.5.1    
 Severity:  normal           |    Keywords:           
-----------------------------+----------------------------------------------
 If __autoload is defined, the upgrade process fails with a WP_User_Search
 class not found error.  This is because wp-admin/includes/user.php does:

 {{{
 if ( !class_exists('WP_User_Search') ) :
 class WP_User_Search {
         var $results;
         // ...
 }}}

 If WP_User_Search doesn't exist and __autoload is defined __autoload is
 invoked to define the class, which fails.  The fix is to include an
 optional second argument to class_exists:

 {{{
 if ( !class_exists('WP_User_Search', false) ) :
 class WP_User_Search {
         var $results;
         // ...
 }}}

 (A patch is attached.)

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


More information about the wp-trac mailing list