summaryrefslogtreecommitdiff
path: root/Zend/zend_operators.c
diff options
context:
space:
mode:
authorZeev Suraski <zeev@php.net>2000-04-10 20:21:13 +0000
committerZeev Suraski <zeev@php.net>2000-04-10 20:21:13 +0000
commite663d856b3fdcb84b1f6525517ebcabe55a4ea0a (patch)
tree5f87d8c0fe2c96ffb638143cffe17b43fd096737 /Zend/zend_operators.c
parent64f91d80fa8296e05bf0c23e4116a646ca480621 (diff)
downloadphp-git-e663d856b3fdcb84b1f6525517ebcabe55a4ea0a.tar.gz
Fix object overloading support
Diffstat (limited to 'Zend/zend_operators.c')
-rw-r--r--Zend/zend_operators.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c
index 0a2cc35148..60ce076a38 100644
--- a/Zend/zend_operators.c
+++ b/Zend/zend_operators.c
@@ -1047,6 +1047,7 @@ ZEND_API int is_smaller_function(zval *result, zval *op1, zval *op2)
return FAILURE;
}
if (result->type == IS_LONG) {
+ result->type = IS_BOOL;
if (result->value.lval < 0) {
result->value.lval = 1;
} else {
@@ -1055,7 +1056,7 @@ ZEND_API int is_smaller_function(zval *result, zval *op1, zval *op2)
return SUCCESS;
}
if (result->type == IS_DOUBLE) {
- result->type = IS_LONG;
+ result->type = IS_BOOL;
if (result->value.dval < 0) {
result->value.lval = 1;
} else {
@@ -1074,6 +1075,7 @@ ZEND_API int is_smaller_or_equal_function(zval *result, zval *op1, zval *op2)
return FAILURE;
}
if (result->type == IS_LONG) {
+ result->type = IS_BOOL;
if (result->value.lval <= 0) {
result->value.lval = 1;
} else {
@@ -1082,7 +1084,7 @@ ZEND_API int is_smaller_or_equal_function(zval *result, zval *op1, zval *op2)
return SUCCESS;
}
if (result->type == IS_DOUBLE) {
- result->type = IS_LONG;
+ result->type = IS_BOOL;
if (result->value.dval <= 0) {
result->value.lval = 1;
} else {