diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2021-02-16 12:32:43 +0100 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2021-02-16 12:33:50 +0100 |
commit | cb9785add1bc8031531c2870c267e6a72efae6af (patch) | |
tree | 2cf4e2c401fbb3f6654665038dcd1f9e94605836 /Zend | |
parent | 2dc75a9e934b5714c0d3b540d341b86a65ee8b6c (diff) | |
download | php-git-cb9785add1bc8031531c2870c267e6a72efae6af.tar.gz |
Fixed bug #80723
This fixes the issue just for the Socket class. Presumably we'll
want to do the same for other "resource" objects.
Diffstat (limited to 'Zend')
-rw-r--r-- | Zend/zend_object_handlers.c | 5 | ||||
-rw-r--r-- | Zend/zend_object_handlers.h | 4 |
2 files changed, 9 insertions, 0 deletions
diff --git a/Zend/zend_object_handlers.c b/Zend/zend_object_handlers.c index f091d679f6..be1631f587 100644 --- a/Zend/zend_object_handlers.c +++ b/Zend/zend_object_handlers.c @@ -1608,6 +1608,11 @@ ZEND_API int zend_std_compare_objects(zval *o1, zval *o2) /* {{{ */ } /* }}} */ +ZEND_API int zend_objects_not_comparable(zval *o1, zval *o2) +{ + return ZEND_UNCOMPARABLE; +} + ZEND_API int zend_std_has_property(zend_object *zobj, zend_string *name, int has_set_exists, void **cache_slot) /* {{{ */ { int result; diff --git a/Zend/zend_object_handlers.h b/Zend/zend_object_handlers.h index fedc70cc80..5134230354 100644 --- a/Zend/zend_object_handlers.h +++ b/Zend/zend_object_handlers.h @@ -213,6 +213,10 @@ ZEND_API int zend_std_compare_objects(zval *o1, zval *o2); ZEND_API int zend_std_get_closure(zend_object *obj, zend_class_entry **ce_ptr, zend_function **fptr_ptr, zend_object **obj_ptr, zend_bool check_only); ZEND_API void rebuild_object_properties(zend_object *zobj); +/* Handler for objects that cannot be meaningfully compared. + * Only objects with the same identity will be considered equal. */ +ZEND_API int zend_objects_not_comparable(zval *o1, zval *o2); + ZEND_API int zend_check_protected(zend_class_entry *ce, zend_class_entry *scope); ZEND_API int zend_check_property_access(zend_object *zobj, zend_string *prop_info_name, zend_bool is_dynamic); |