[wp-hackers] s/addslashes/$wpdb->escape/

Mike Little journalized at gmail.com
Tue Jul 5 23:23:43 GMT 2005


On 05/07/05, Ryan Boren <ryan at boren.nu> wrote:
> http://trac.wordpress.org/changeset/2699
> 
> Changing over to $wpdb->escape() instead of addslashes() to prepare data
> for the DB.  $wpdb->escape() now looks like this:
> 
> function escape($string) {
>   if( !$this->dbh || version_compare( phpversion(), '4.3.0' ) == '-1' )
>     return mysql_escape_string( $string );
>   else
>     return mysql_real_escape_string( $string, $this->dbh );
> }
> 
> Holler if something breaks.
> 
> Ryan
> 

Everything!

Home page equals empty feed.
can't login
upgrade appears to do nothing (returns to same page)
dropped database - install appears to do nothing (returns to same page)

revert to 2698
drop database
install 
all ok

update to 2699
run upgrade (returns to same page)
can't login
home page is empty feed.

drop database 
still with 2699 - install
does nothing (returns to same page)
no tables created.


Mike
-- 
Mike Little
http://zed1.com/journalized/


More information about the wp-hackers mailing list