Fixed bug #31465 (False warning in unpack() when working with *).

This commit is contained in:
Ilia Alshanetsky 2005-01-25 22:50:39 +00:00
parent 27b1a27faf
commit 8c22d51070

View file

@ -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) {