diff options
Diffstat (limited to 'ext/spl/spl_engine.c')
-rw-r--r-- | ext/spl/spl_engine.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/ext/spl/spl_engine.c b/ext/spl/spl_engine.c index 3d12b04799..a2f3653432 100644 --- a/ext/spl/spl_engine.c +++ b/ext/spl/spl_engine.c @@ -48,10 +48,14 @@ PHPAPI long spl_offset_convert_to_long(zval *offset TSRMLS_DC) /* {{{ */ break; case IS_DOUBLE: return (long)Z_DVAL_P(offset); - case IS_RESOURCE: - case IS_BOOL: case IS_LONG: return Z_LVAL_P(offset); + case IS_FALSE: + return 0; + case IS_TRUE: + return 1; + case IS_RESOURCE: + return Z_RES_HANDLE_P(offset); } return -1; } |