From: Zeev Suraski Date: Mon, 24 May 1999 16:48:01 +0000 (+0000) Subject: The last fix was wrong X-Git-Tag: BEFORE_REMOVING_GC_STEP1~280 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e115fdc6d606b146ab13aa6b27a870ff0f8fe24a;p=php The last fix was wrong --- diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c index 3a18e94b24..162a634162 100644 --- a/Zend/zend_operators.c +++ b/Zend/zend_operators.c @@ -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); \ }