From: Dmitry Stogov Date: Mon, 24 Feb 2014 13:29:28 +0000 (+0400) Subject: Fixed comparison od references X-Git-Tag: POST_PHPNG_MERGE~412^2~551 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=760fe72af6733de6415d4c185f2e0fa395aec68d;p=php Fixed comparison od references --- diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c index 8504ca5aaf..7e77d976fb 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);