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

Ryan Boren ryan at boren.nu
Wed Jul 6 01:14:04 GMT 2005


On Wed, 2005-07-06 at 01:22 +0100, Mike Little wrote:
> On 06/07/05, Mike Little <journalized at gmail.com> wrote:
> > On 06/07/05, Ryan Boren <ryan at boren.nu> wrote:
> > >
> > > Everything is okay here.
> > >
> > > Maybe wpdb->escape is returning an empty string.
> > >
> > > Ryan
> > 
> > I've narrowed it down to wp-settings.php
> > 
> > If I get everything at 2699 except wp-settings.php, everything is fine.
> > 
> 
> if ( get_magic_quotes_gpc() ) {
> 	$_GET    = stripslashes($_GET   );
> 	$_POST   = stripslashes($_POST  );
> 	$_COOKIE = stripslashes($_COOKIE);
> 	$_SERVER = stripslashes($_SERVER);
> }
> 
> stripslashes doesn't work on arrays [1]. 
> 
> I threw in the stripslashes_deep() from the documentation[1] and it fixed it.

Doh.  Thanks.

http://trac.wordpress.org/changeset/2700

Ryan



More information about the wp-hackers mailing list