From: Marcus Boerger Date: Mon, 7 Mar 2005 21:52:34 +0000 (+0000) Subject: - Make maic qutes runtime work if length is specified too X-Git-Tag: RELEASE_0_3~41 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=97655f8a3b88062bd3c09182e1c5d69cfe0c4a6f;p=php - Make maic qutes runtime work if length is specified too --- diff --git a/ext/standard/file.c b/ext/standard/file.c index f1d283f106..a64242ec1c 100644 --- a/ext/standard/file.c +++ b/ext/standard/file.c @@ -1240,8 +1240,8 @@ PHPAPI PHP_FUNCTION(fwrite) PHP_STREAM_TO_ZVAL(stream, arg1); - if (!arg3 && PG(magic_quotes_runtime)) { - buffer = estrndup(Z_STRVAL_PP(arg2), Z_STRLEN_PP(arg2)); + if (PG(magic_quotes_runtime)) { + buffer = estrndup(Z_STRVAL_PP(arg2), num_bytes); php_stripslashes(buffer, &num_bytes TSRMLS_CC); }