summaryrefslogtreecommitdiff
path: root/ext/standard/pack.c
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2005-01-25 22:50:39 +0000
committerIlia Alshanetsky <iliaa@php.net>2005-01-25 22:50:39 +0000
commit8c22d51070a91b8f5c975cf718005a144635bc23 (patch)
tree7729f32f4d5992e2a5c38a5caf761b517be4e67e /ext/standard/pack.c
parent27b1a27faf6ff0cdb9dec8a8c7006182918e0468 (diff)
downloadphp-git-8c22d51070a91b8f5c975cf718005a144635bc23.tar.gz
Fixed bug #31465 (False warning in unpack() when working with *).
Diffstat (limited to 'ext/standard/pack.c')
-rw-r--r--ext/standard/pack.c4
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) {