mirror of
https://github.com/php/php-src.git
synced 2026-04-26 09:28:21 +02:00
MFH: fix bug #47220 (segfault in dom_document_parser in recovery mode)
This commit is contained in:
+1
-1
@@ -1625,7 +1625,7 @@ static xmlDocPtr dom_document_parser(zval *id, int mode, char *source, int optio
|
||||
EG(error_reporting) = old_error_reporting;
|
||||
}
|
||||
/* If loading from memory, set the base reference uri for the document */
|
||||
if (ret->URL == NULL && ctxt->directory != NULL) {
|
||||
if (ret && ret->URL == NULL && ctxt->directory != NULL) {
|
||||
ret->URL = xmlStrdup(ctxt->directory);
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user