diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2021-02-16 14:20:45 +0100 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2021-02-16 14:20:45 +0100 |
commit | b63ea1047a5c130231cec5571861f1dcdf63a063 (patch) | |
tree | 0fff21141ba410ca439833f64b41e86a1d22e2b4 /ext/xml/xml.c | |
parent | cb9785add1bc8031531c2870c267e6a72efae6af (diff) | |
download | php-git-b63ea1047a5c130231cec5571861f1dcdf63a063.tar.gz |
Mark resource-like objects as non-comparable
As these hold on to some internal resource, there can't be two
"equal" objects with different identity. Make sure the lack of
public properties doesn't result in these being treated as always
equal.
Diffstat (limited to 'ext/xml/xml.c')
-rw-r--r-- | ext/xml/xml.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/ext/xml/xml.c b/ext/xml/xml.c index 3064545739..307608ae8b 100644 --- a/ext/xml/xml.c +++ b/ext/xml/xml.c @@ -267,6 +267,7 @@ PHP_MINIT_FUNCTION(xml) xml_parser_object_handlers.get_gc = xml_parser_get_gc; xml_parser_object_handlers.get_constructor = xml_parser_get_constructor; xml_parser_object_handlers.clone_obj = NULL; + xml_parser_object_handlers.compare = zend_objects_not_comparable; REGISTER_LONG_CONSTANT("XML_ERROR_NONE", XML_ERROR_NONE, CONST_CS|CONST_PERSISTENT); REGISTER_LONG_CONSTANT("XML_ERROR_NO_MEMORY", XML_ERROR_NO_MEMORY, CONST_CS|CONST_PERSISTENT); |