]> granicus.if.org Git - php/commitdiff
MFH: fix msg_recieve() and add test
authorAntony Dovgal <tony2001@php.net>
Mon, 24 Jan 2005 14:25:16 +0000 (14:25 +0000)
committerAntony Dovgal <tony2001@php.net>
Mon, 24 Jan 2005 14:25:16 +0000 (14:25 +0000)
ext/sysvmsg/sysvmsg.c

index 59d3c0ead7815242f6503d531bcd177280c54825..a212a0c746ee24f6c4378bc40d17b3777e942322 100644 (file)
@@ -330,6 +330,7 @@ PHP_FUNCTION(msg_receive)
                /* got it! */
                ZVAL_LONG(out_msgtype, messagebuffer->mtype);
 
+               RETVAL_TRUE;
                if (do_unserialize)     {
                        php_unserialize_data_t var_hash;
                        zval *tmp = NULL;
@@ -347,7 +348,6 @@ PHP_FUNCTION(msg_receive)
                } else {
                        ZVAL_STRINGL(out_message, messagebuffer->mtext, result, 1);
                }
-               RETVAL_TRUE;
        } else if (zerrcode) {
                ZVAL_LONG(zerrcode, errno);
        }