diff options
Diffstat (limited to 'ext/standard/pack.c')
-rw-r--r-- | ext/standard/pack.c | 4 |
1 files changed, 3 insertions, 1 deletions
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) { |