Skip to content

Commit 872bf56

Browse files
committed
Remove useless check
This is a remnant from the time the parser could be invoked statically.
1 parent 3ff7d18 commit 872bf56

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

ext/dom/document.c

+2-6
Original file line numberDiff line numberDiff line change
@@ -1204,17 +1204,13 @@ static xmlDocPtr dom_document_parser(zval *id, int mode, char *source, size_t so
12041204
{
12051205
xmlDocPtr ret;
12061206
xmlParserCtxtPtr ctxt = NULL;
1207-
dom_object *intern;
1208-
php_libxml_ref_obj *document = NULL;
12091207
int validate, recover, resolve_externals, keep_blanks, substitute_ent;
12101208
int resolved_path_len;
12111209
int old_error_reporting = 0;
12121210
char *directory=NULL, resolved_path[MAXPATHLEN + 1];
12131211

1214-
if (id != NULL) {
1215-
intern = Z_DOMOBJ_P(id);
1216-
document = intern->document;
1217-
}
1212+
dom_object *intern = Z_DOMOBJ_P(id);
1213+
php_libxml_ref_obj *document = intern->document;
12181214

12191215
libxml_doc_props const* doc_props = dom_get_doc_props_read_only(document);
12201216
validate = doc_props->validateonparse;

0 commit comments

Comments
 (0)