From 9e55579cb0b002945dd097c43832aba88509e781 Mon Sep 17 00:00:00 2001 From: Antony Dovgal Date: Mon, 24 Jan 2005 14:12:01 +0000 Subject: fix msg_recieve() returning TRUE instead of FALSE when unserialize failed (patch by Andrey Hristov) --- ext/sysvmsg/sysvmsg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext/sysvmsg') diff --git a/ext/sysvmsg/sysvmsg.c b/ext/sysvmsg/sysvmsg.c index 99864e4c29..844b0936fd 100644 --- a/ext/sysvmsg/sysvmsg.c +++ b/ext/sysvmsg/sysvmsg.c @@ -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); } -- cgit v1.2.1