Skip to content

Commit 9a95d04

Browse files
committed
fix #105
1 parent 90e7338 commit 9a95d04

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

msgpack_class.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -197,8 +197,7 @@ static ZEND_METHOD(msgpack, setOption) /* {{{ */ {
197197

198198
switch (option) {
199199
case MSGPACK_CLASS_OPT_PHPONLY:
200-
convert_to_boolean(value);
201-
base->php_only = (Z_TYPE_P(value) == IS_TRUE) ? 1 : 0;
200+
base->php_only = i_zend_is_true(value);
202201
break;
203202
default:
204203
MSGPACK_WARNING("[msgpack] (MessagePack::setOption) "
@@ -326,8 +325,7 @@ static ZEND_METHOD(msgpack_unpacker, setOption) /* {{{ */ {
326325

327326
switch (option) {
328327
case MSGPACK_CLASS_OPT_PHPONLY:
329-
convert_to_boolean(value);
330-
unpacker->php_only = Z_LVAL_P(value);
328+
unpacker->php_only = i_zend_is_true(value);
331329
break;
332330
default:
333331
MSGPACK_WARNING("[msgpack] (MessagePackUnpacker::setOption) "

0 commit comments

Comments
 (0)