|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2007-03-03 20:56 UTC] spam02 at pornel dot net
Description: ------------ It's great that PHP6 dropped support for magic_quotes, but I don't see a reason to trigger fatal error when set_magic_quotes_runtime(0) is executed (note the argument value). I think it's completly harmless if application attempts to *disable* magic_quotes in PHP6 and error should be thrown only on attempts to enable magic_quotes. In practicular this affects PHPBB, which won't run under PHP6 because of this. Reproduce code: --------------- <?php set_magic_quotes_runtime(0); Expected result: ---------------- Notice or nothing. Actual result: -------------- Fatal error (not even Catchable Fatal). PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Nov 03 22:00:01 2025 UTC |
You can easily prevent the error: <?php if (!function_exists('set_magic_quotes_runtime')) { function set_magic_quotes_runtime($val) { if ($val) { // throw an error or do some work around } } } ?> or by checking the PP version before calling the function. There's no real need to keep such a function inside PHP once the feature was removed.