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

Mike Little journalized at gmail.com
Wed Jul 6 00:22:49 GMT 2005


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.

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

[1] http://uk2.php.net/stripslashes


More information about the wp-hackers mailing list