Bug #52221 [NEW]: Misbehaviour of magic_quotes_runtime (get/set))

From: Date: Thu, 01 Jul 2010 12:13:40 +0000
Subject: Bug #52221 [NEW]: Misbehaviour of magic_quotes_runtime (get/set))
Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-4631@lists.php.net to get a copy of this message
From: Operating system: Windows Server 2008 R2 PHP version: 5.3.2 Package: Documentation problem Bug Type: Bug Bug description:Misbehaviour of magic_quotes_runtime (get/set)) Description: ------------ The documentation lists the get_magic_quotes_runtime() / set_magic_quotes_runtime() functions as DEPRECATED as of this PHP version. They still exist and can be called, but already work inconsistent. When magic_quotes_runtime file_get_contents() still escapes data, mysqli_fetch_assoc() does not anymore. Test script: --------------- <?php set_magic_quotes_runtime(1); echo "GMQR: "; var_dump(get_magic_quotes_runtime()); $c = mysqli_connect(); mysqli_select_db($c, "test"); $r = mysqli_query($c, "select t from test;"); $ra = mysqli_fetch_assoc($r); echo "\nDB test:\n" . $ra['t']; $f = file_get_contents("test.txt"); echo "\n\nfile test.txt:\n" . $f; ---- Content of "test.txt" and table "t": backslash: \ slash: / double backslash: \\ quotes: " single quotes: ' Expected result: ---------------- Expecting similar behaviour from both function calls, dependent of the acutal magic_quotes_runtime setting. -OR- throwing a fatal or catchable_fatal error that unexpectet results can occur. A function thould be completely removed instead of marked as deprecated, when it starts to stop working like before. Actual result: -------------- Deprecated: Function set_magic_quotes_runtime() is deprecated in test.php on line 1 GMQR: int(1) DB test: backslash: \ slash: / double backslash: \\ quotes: " single quotes: ' file test.txt: backslash: \\ slash: / double backslash: \\\\ quotes: \" single quotes: \' -- Edit bug report at http://bugs.php.net/bug.php?id=52221&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=52221&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=52221&r=trysnapshot53 Try a snapshot (trunk): http://bugs.php.net/fix.php?id=52221&r=trysnapshottrunk Fixed in SVN: http://bugs.php.net/fix.php?id=52221&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=52221&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=52221&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=52221&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=52221&r=needscript Try newer version: http://bugs.php.net/fix.php?id=52221&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=52221&r=support Expected behavior: http://bugs.php.net/fix.php?id=52221&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=52221&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=52221&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=52221&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=52221&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=52221&r=dst IIS Stability: http://bugs.php.net/fix.php?id=52221&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=52221&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=52221&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=52221&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=52221&r=mysqlcfg

« previous php.doc.bugs (#4631) next »