]> granicus.if.org Git - php/commitdiff
The last fix was wrong
authorZeev Suraski <zeev@php.net>
Mon, 24 May 1999 16:48:01 +0000 (16:48 +0000)
committerZeev Suraski <zeev@php.net>
Mon, 24 May 1999 16:48:01 +0000 (16:48 +0000)
Zend/zend_operators.c

index 3a18e94b242c9725ce40cd9a86ceb86e27691715..162a63416241906b97a65b2b26d3c5e5ee1d64b5 100644 (file)
@@ -66,16 +66,15 @@ ZEND_API void convert_scalar_to_number(zval *op)
                        case IS_BC: \
                                (holder).type = IS_DOUBLE; /* may have lost significant digits */ \
                                break; \
-                       case IS_RESOURCE: \
-                       case IS_BOOL: \
-                               (holder).type = IS_LONG; \
-                               break; \
                        default: \
                                (holder).value.lval = strtol((op)->value.str.val, NULL, 10); \
                                (holder).type = IS_LONG; \
                                break; \
                } \
                (op) = &(holder); \
+       } else if ((op)->type==IS_BOOL || (op)->type==IS_RESOURCE) { \
+               (holder).type = IS_LONG; \
+               (op) = &(holder); \
        }