Skip to content

Commit 634dd38

Browse files
committed
Throw Error exception in DOM_GET_OBJ
Per general convention for handling of uninitialized objects.
1 parent e17ff61 commit 634dd38

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ext/dom/php_dom.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,8 @@ entry = zend_register_internal_class_ex(&ce, parent_ce);
140140
#define DOM_GET_OBJ(__ptr, __id, __prtype, __intern) { \
141141
__intern = Z_DOMOBJ_P(__id); \
142142
if (__intern->ptr == NULL || !(__ptr = (__prtype)((php_libxml_node_ptr *)__intern->ptr)->node)) { \
143-
php_error_docref(NULL, E_WARNING, "Couldn't fetch %s", ZSTR_VAL(__intern->std.ce->name));\
144-
RETURN_NULL();\
143+
zend_throw_error(NULL, "Couldn't fetch %s", ZSTR_VAL(__intern->std.ce->name));\
144+
RETURN_THROWS();\
145145
} \
146146
}
147147

0 commit comments

Comments
 (0)