summaryrefslogtreecommitdiff
path: root/ext/sysvmsg
diff options
context:
space:
mode:
authorAntony Dovgal <tony2001@php.net>2005-01-24 14:12:01 +0000
committerAntony Dovgal <tony2001@php.net>2005-01-24 14:12:01 +0000
commit9e55579cb0b002945dd097c43832aba88509e781 (patch)
tree1f9476e6c1f9f4ed43cd5c34714c0285266df915 /ext/sysvmsg
parent62121a184053b9bbd3deb917bad69d8b23988e33 (diff)
downloadphp-git-9e55579cb0b002945dd097c43832aba88509e781.tar.gz
fix msg_recieve() returning TRUE instead of FALSE when unserialize failed
(patch by Andrey Hristov)
Diffstat (limited to 'ext/sysvmsg')
-rw-r--r--ext/sysvmsg/sysvmsg.c2
1 files changed, 1 insertions, 1 deletions
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);
}