Skip to content

Commit 1511bda

Browse files
committed
Throw Error on uninitialized XMLWriter
1 parent fc7bab3 commit 1511bda

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ext/xmlwriter/php_xmlwriter.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ typedef int (*xmlwriter_read_int_t)(xmlTextWriterPtr writer);
3838
ze_xmlwriter_object *obj = Z_XMLWRITER_P(object); \
3939
ptr = obj->ptr; \
4040
if (!ptr) { \
41-
php_error_docref(NULL, E_WARNING, "Invalid or uninitialized XMLWriter object"); \
42-
RETURN_FALSE; \
41+
zend_throw_error(NULL, "Invalid or uninitialized XMLWriter object"); \
42+
RETURN_THROWS(); \
4343
} \
4444
}
4545
/* }}} */

0 commit comments

Comments
 (0)