com php-src: Fixed comparison od references: Zend/zend_operat ors.c
| From: | Dmitry Stogov | Date: | Mon, 24 Feb 2014 13:29:28 +0000 |
| Subject: | com php-src: Fixed comparison od references: Zend/zend_operat ors.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-77955@lists.php.net to get a copy of this message | ||
Commit: 760fe72af6733de6415d4c185f2e0fa395aec68d
Author: Dmitry Stogov <dmitry@zend.com> Mon, 24 Feb 2014 17:29:28 +0400
Parents: 55bca5868aabe15cd08d763ee945cfb23bef69cb
Branches: phpng
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=760fe72af6733de6415d4c185f2e0fa395aec68d
Log:
Fixed comparison od references
Changed paths:
M Zend/zend_operators.c
Diff:
diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c
index 8504ca5..7e77d97 100644
--- a/Zend/zend_operators.c
+++ b/Zend/zend_operators.c
@@ -1667,7 +1667,11 @@ ZEND_API int compare_function(zval *result, zval *op1, zval *op2 TSRMLS_DC)
/* {
return SUCCESS;
}
}
- if (!converted) {
+ if (Z_TYPE_P(op1) == IS_REFERENCE) {
+ op1 = Z_REFVAL_P(op1);
+ } else if (Z_TYPE_P(op2) == IS_REFERENCE) {
+ op2 = Z_REFVAL_P(op2);
+ } else if (!converted) {
if (Z_TYPE_P(op1) == IS_NULL) {
zendi_convert_to_boolean(op2, op2_copy, result);
ZVAL_LONG(result, Z_LVAL_P(op2) ? -1 : 0);