diff --git a/src/wp-includes/load.php b/src/wp-includes/load.php index 70b748691f..1275acad37 100644 --- a/src/wp-includes/load.php +++ b/src/wp-includes/load.php @@ -603,9 +603,6 @@ function wp_magic_quotes() { $_COOKIE = stripslashes_deep( $_COOKIE ); } - // Turn off sybase quoting after stripslashes has run - @ini_set( 'magic_quotes_sybase', 0 ); - // Escape with wpdb. $_GET = add_magic_quotes( $_GET ); $_POST = add_magic_quotes( $_POST ); diff --git a/src/wp-settings.php b/src/wp-settings.php index bb2043e43a..1c5da84923 100644 --- a/src/wp-settings.php +++ b/src/wp-settings.php @@ -46,6 +46,7 @@ wp_check_php_mysql_versions(); // Disable magic quotes at runtime. Magic quotes are added using wpdb later in wp-settings.php. @ini_set( 'magic_quotes_runtime', 0 ); +@ini_set( 'magic_quotes_sybase', 0 ); // WordPress calculates offsets from UTC. date_default_timezone_set( 'UTC' ); diff --git a/tests/phpunit/tests/load.php b/tests/phpunit/tests/load.php deleted file mode 100644 index 1fd08584d7..0000000000 --- a/tests/phpunit/tests/load.php +++ /dev/null @@ -1,91 +0,0 @@ -assertEquals( $expected, $_GET['ticket_19455'] ); - } - - /** - * String in $_POST array is modified as expected - * - * @dataProvider data_strings_and_expected_strings - * @ticket 19455 - */ - public function test_string_in_POST_array_is_modified_as_expected( $original, $expected ) { - $_POST['ticket_19455'] = $original; - - wp_magic_quotes(); - - $this->assertEquals( $expected, $_POST['ticket_19455'] ); - } - - /** - * String in $_COOKIE array is modified as expected - * - * @dataProvider data_strings_and_expected_strings - * @ticket 19455 - */ - public function test_string_in_COOKIE_array_is_modified_as_expected( $original, $expected ) { - $_COOKIE['ticket_19455'] = $original; - - wp_magic_quotes(); - - $this->assertEquals( $expected, $_COOKIE['ticket_19455'] ); - } - - /** - * String in $_SERVER array is modified as expected - * - * @dataProvider data_strings_and_expected_strings - * @ticket 19455 - */ - public function test_string_in_SERVER_array_is_modified_as_expected( $original, $expected ) { - $_SERVER['ticket_19455'] = $original; - - wp_magic_quotes(); - - $this->assertEquals( $expected, $_SERVER['ticket_19455'] ); - } - -}