summaryrefslogtreecommitdiff
path: root/Zend/zend_inheritance.c
diff options
context:
space:
mode:
authorPedro Magalhães <mail@pmmaga.net>2017-04-10 22:04:18 +0200
committerNikita Popov <nikita.ppv@gmail.com>2017-05-01 12:59:27 +0200
commit92124f9cdc20c6a9c22f9b54092ef945c41f2bb5 (patch)
tree87ad424570200125900fc4a9185c078128056495 /Zend/zend_inheritance.c
parentf9215b6519d4732498e598de9a3581297c60c4e8 (diff)
downloadphp-git-92124f9cdc20c6a9c22f9b54092ef945c41f2bb5.tar.gz
Fixed bug #74269: Strict comparison of initial trait property values
Diffstat (limited to 'Zend/zend_inheritance.c')
-rw-r--r--Zend/zend_inheritance.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/Zend/zend_inheritance.c b/Zend/zend_inheritance.c
index 71b3eb06da..675d8c4b75 100644
--- a/Zend/zend_inheritance.c
+++ b/Zend/zend_inheritance.c
@@ -23,7 +23,7 @@
#include "zend_execute.h"
#include "zend_inheritance.h"
#include "zend_smart_str.h"
-#include "zend_inheritance.h"
+#include "zend_operators.h"
static void overriden_ptr_dtor(zval *zv) /* {{{ */
{
@@ -1576,15 +1576,11 @@ static void zend_do_traits_property_binding(zend_class_entry *ce) /* {{{ */
== (flags & (ZEND_ACC_PPP_MASK | ZEND_ACC_STATIC))) {
/* flags are identical, now the value needs to be checked */
if (flags & ZEND_ACC_STATIC) {
- not_compatible = (FAILURE == compare_function(&compare_result,
- &ce->default_static_members_table[coliding_prop->offset],
- &ce->traits[i]->default_static_members_table[property_info->offset]))
- || (Z_LVAL(compare_result) != 0);
+ not_compatible = fast_is_not_identical_function(&ce->default_static_members_table[coliding_prop->offset],
+ &ce->traits[i]->default_static_members_table[property_info->offset]);
} else {
- not_compatible = (FAILURE == compare_function(&compare_result,
- &ce->default_properties_table[OBJ_PROP_TO_NUM(coliding_prop->offset)],
- &ce->traits[i]->default_properties_table[OBJ_PROP_TO_NUM(property_info->offset)]))
- || (Z_LVAL(compare_result) != 0);
+ not_compatible = fast_is_not_identical_function(&ce->default_properties_table[OBJ_PROP_TO_NUM(coliding_prop->offset)],
+ &ce->traits[i]->default_properties_table[OBJ_PROP_TO_NUM(property_info->offset)]);
}
} else {
/* the flags are not identical, thus, we assume properties are not compatible */