Permalink
Browse files

Merge branch 'PHP-5.4'

  • Loading branch information...
2 parents 5e51209 + 66fad45 commit b5d2c3174fcd3785d827ee310669189e827ca7ec @laruence laruence committed Aug 31, 2012
Showing with 5 additions and 6 deletions.
  1. +3 −0 Zend/zend_operators.c
  2. +2 −6 tests/lang/compare_objects_basic2.phpt
View
@@ -1556,6 +1556,9 @@ ZEND_API int compare_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) /* {
ret = compare_function(result, op1, op_free TSRMLS_CC);
zend_free_obj_get_result(op_free TSRMLS_CC);
return ret;
+ } else if (Z_TYPE_P(op1) == IS_OBJECT) {
+ ZVAL_LONG(result, 1);
+ return SUCCESS;
}
}
if (!converted) {
@@ -20,9 +20,5 @@ var_dump($obj1 == $obj2);
===DONE===
--EXPECTF--
Simple test comparing two objects with different compare callback handler
-
-Notice: Object of class X could not be converted to int in %s on line %d
-
-Notice: Object of class DateTime could not be converted to int in %s on line %d
-bool(true)
-===DONE===
+bool(false)
+===DONE===

0 comments on commit b5d2c31

Please sign in to comment.