From 8c22d51070a91b8f5c975cf718005a144635bc23 Mon Sep 17 00:00:00 2001 From: Ilia Alshanetsky Date: Tue, 25 Jan 2005 22:50:39 +0000 Subject: [PATCH] Fixed bug #31465 (False warning in unpack() when working with *). --- ext/standard/pack.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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) { -- 2.50.1