From: Ilia Alshanetsky Date: Tue, 25 Jan 2005 22:52:19 +0000 (+0000) Subject: MFH: Fixed bug #31465 (False warning in unpack() when working with *). X-Git-Tag: php-4.3.11RC1~99 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=13c9761b16dd79dce8299b2ba172cc6ebfe04286;p=php MFH: Fixed bug #31465 (False warning in unpack() when working with *). --- diff --git a/NEWS b/NEWS index 4643372392..c758858f65 100644 --- a/NEWS +++ b/NEWS @@ -13,6 +13,7 @@ PHP 4 NEWS - Fixed bug #31580 (fgetcsv() problematic with "" escape sequences). (Ilia) - Fixed bug #31480 (Possible infinite loop in imap_mail_compose()). (Ilia) - Fixed bug #31479 (Fixed crash in chunk_split(), when chunklen > strlen). (Ilia) +- Fixed bug #31465 (False warning in unpack() when working with *). (Ilia) - Fixed bug #31454 (session_set_save_handler crashes PHP when supplied non-existent object ref). (Tony) - Fixed bug #31444 (Memory leak in zend_language_scanner.c). diff --git a/ext/standard/pack.c b/ext/standard/pack.c index adef56a2f3..a6a32bdc55 100644 --- a/ext/standard/pack.c +++ b/ext/standard/pack.c @@ -833,7 +833,9 @@ PHP_FUNCTION(unpack) inputpos += size; if (inputpos < 0) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Type %c: outside of string", type); + if (size != -1) { /* only print warning if not working with * */ + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Type %c: outside of string", type); + } inputpos = 0; } } else if (arg < 0) {