[wp-trac] Re: [WordPress Trac] #5860: In 2.5 bleeding, activating plugin that uses upgrade functions gives spurious warning

WordPress Trac wp-trac at lists.automattic.com
Thu Feb 14 20:20:17 GMT 2008


#5860: In 2.5 bleeding, activating plugin that uses upgrade functions gives
spurious warning
----------------------------+-----------------------------------------------
 Reporter:  jhodgdon        |        Owner:  anonymous
     Type:  defect          |       Status:  new      
 Priority:  normal          |    Milestone:  2.5      
Component:  Administration  |      Version:  2.5      
 Severity:  normal          |   Resolution:           
 Keywords:                  |  
----------------------------+-----------------------------------------------
Comment (by jhodgdon):

 Apparently, the problem is that the wp-admin/includes/schema.php file has
 a line near the top, that in 2.5 bleeding, calls the
 $wpdb->supports_collation() function.

 Just putting that function in the activate function causes this problem to
 occur. I am not sure why, because when I copied the body of the function
 and did the same thing, that was OK. ????

 {{{
   // this line is OK, so it isn't the $wpdb object itself...
   $tmp = $wpdb->prefix;

   // this line is OK -- and this is the function body
   $tmp = version_compare(mysql_get_server_info($wpdb->dbh), '4.1.0',
 '>=');

   // this line is OK
   $tmp = $wpdb->dbh;

   // but this line causes plugin activation to have an error
   $tmp = $wpdb->supports_collation();
 }}}

 In fact, when I put that last line at the top of my plugin file (outside
 the activate function), it also caused a fatal error (though I didn't get
 an error message). Any idea what might be happening, or why that would
 cause a fatal error, when the function body of the supports_collation
 function doesn't? It would be helpful if I had an error message, but it
 doesn't give me anything useful.

-- 
Ticket URL: <http://trac.wordpress.org/ticket/5860#comment:1>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list