]> granicus.if.org Git - php/commitdiff
Fixed bug #33080 (missing MFH of a fix for bug #31465)
authorIlia Alshanetsky <iliaa@php.net>
Fri, 27 May 2005 02:03:27 +0000 (02:03 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Fri, 27 May 2005 02:03:27 +0000 (02:03 +0000)
ext/standard/pack.c

index f7f630bc796d307a9adb85d231703f381077d118..3f1c87294455af2578d923e11d062acbe2ba147d 100644 (file)
@@ -824,7 +824,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) {