diff options
| author | Dmitry Stogov <dmitry@zend.com> | 2014-02-19 14:35:28 +0400 |
|---|---|---|
| committer | Dmitry Stogov <dmitry@zend.com> | 2014-02-19 14:35:28 +0400 |
| commit | 8bae1daa0c7f6b66283baedd5205906fc6357363 (patch) | |
| tree | 7db3ada36331e5452aa8503b8156a205da9b845c /Zend/zend_operators.c | |
| parent | 9067dbcd0d8d8bed6c723d274b162182f33281ea (diff) | |
| download | php-git-8bae1daa0c7f6b66283baedd5205906fc6357363.tar.gz | |
Use better data structures (incomplete)
Diffstat (limited to 'Zend/zend_operators.c')
| -rw-r--r-- | Zend/zend_operators.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c index 1dff55c8f0..4edd202bfc 100644 --- a/Zend/zend_operators.c +++ b/Zend/zend_operators.c @@ -1407,10 +1407,20 @@ ZEND_API int string_compare_function_ex(zval *result, zval *op1, zval *op2, zend int use_copy1 = 0, use_copy2 = 0; if (Z_TYPE_P(op1) != IS_STRING) { - zend_make_printable_zval(op1, &op1_copy, &use_copy1); + if (Z_TYPE_P(op1) == IS_REFERENCE) { + op1 = Z_REFVAL_P(op1); + } + if (Z_TYPE_P(op1) != IS_STRING) { + zend_make_printable_zval(op1, &op1_copy, &use_copy1); + } } if (Z_TYPE_P(op2) != IS_STRING) { - zend_make_printable_zval(op2, &op2_copy, &use_copy2); + if (Z_TYPE_P(op2) == IS_REFERENCE) { + op2 = Z_REFVAL_P(op2); + } + if (Z_TYPE_P(op2) != IS_STRING) { + zend_make_printable_zval(op2, &op2_copy, &use_copy2); + } } if (use_copy1) { |
