From: Ilia Alshanetsky Date: Tue, 25 Jan 2005 22:50:39 +0000 (+0000) Subject: Fixed bug #31465 (False warning in unpack() when working with *). X-Git-Tag: RELEASE_0_2~151 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8c22d51070a91b8f5c975cf718005a144635bc23;p=php Fixed bug #31465 (False warning in unpack() when working with *). --- diff --git a/ext/standard/pack.c b/ext/standard/pack.c index f41695c562..12395e920f 100644 --- a/ext/standard/pack.c +++ b/ext/standard/pack.c @@ -830,7 +830,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) {