]> granicus.if.org Git - php/commitdiff
Minor cleanup in regards to magic_quotes in tests:
authorKalle Sommer Nielsen <kalle@php.net>
Tue, 26 Jun 2018 20:38:00 +0000 (22:38 +0200)
committerKalle Sommer Nielsen <kalle@php.net>
Tue, 26 Jun 2018 20:38:00 +0000 (22:38 +0200)
- dba008.phpt never runs anyway, no need to keep it
- bug75357.phpt has a branch that is never hit, which should not change the bug behavior in anyway
- bug55371.phpt added a simple 'done' test to not let the EXPECT section be empty

ext/dba/tests/dba008.phpt [deleted file]
ext/opcache/tests/bug75357.phpt
ext/standard/tests/general_functions/bug55371.phpt

diff --git a/ext/dba/tests/dba008.phpt b/ext/dba/tests/dba008.phpt
deleted file mode 100644 (file)
index f7015d9..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
---TEST--
-DBA magic_quotes_runtime Test
---SKIPIF--
-<?php 
-       die('skip, magic_quotes removed');
-       require_once(dirname(__FILE__) .'/skipif.inc');
-       die("info $HND handler used");
-?>
---FILE--
-<?php
-       require_once(dirname(__FILE__) .'/test.inc');
-       echo "database handler: $handler\n";
-       if (($db_file=dba_open($db_file, "n", $handler))!==FALSE) {
-               ini_set('magic_quotes_runtime', 0);
-               dba_insert("key1", '"', $db_file);
-               var_dump(dba_fetch("key1", $db_file));
-               ini_set('magic_quotes_runtime', 1);
-               var_dump(dba_fetch("key1", $db_file));
-               dba_replace("key1", '\"', $db_file);
-               var_dump(dba_fetch("key1", $db_file));
-               ini_set('magic_quotes_runtime', 0);
-               var_dump(dba_fetch("key1", $db_file));
-               dba_close($db_file);
-       } else {
-               echo "Error creating database\n";
-       }
-?>
---CLEAN--
-<?php 
-       require(dirname(__FILE__) .'/clean.inc'); 
-?>
---EXPECTF--
-database handler: %s
-string(1) """
-string(2) "\""
-string(2) "\""
-string(1) """
index 9dbace25e6654889612bff9ef3653d72d0cbe402..359f6160c27ccda93f5dd2e7f3bb690d5750e7d5 100644 (file)
@@ -26,9 +26,6 @@ function wp_slash( $value ) {
 }
 
 function addslashes_gpc($gpc) {
-       if ( get_magic_quotes_gpc() )
-               $gpc = stripslashes($gpc);
-
        return wp_slash($gpc);
 }
 
index 179da01f39946e49d966009893beef45a4c8fdd4..e28a6e5009322526a2e74b2370b09a3916138c86 100644 (file)
@@ -6,5 +6,8 @@ Bug #55371 (get_magic_quotes_gpc() and get_magic_quotes_runtime() throw deprecat
 get_magic_quotes_gpc();
 get_magic_quotes_runtime();
 
+echo 'done';
+
 ?>
 --EXPECT--
+done