-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix crashes with entity references and predefined entities
There's two issues here: - freeing of predefined entity declaration crashes (unique to 8.3 & master) - using multiple entity references for a single entity declaration crashes (since forever) The fix for the last issue is fairly easy to do on 8.3, but may require a slightly different approach on 8.2. Therefore, for now this is 8.3-only. Closes GH-13004.
- Loading branch information
Showing
4 changed files
with
78 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
--TEST-- | ||
Freeing of a predefined DOMEntityReference | ||
--EXTENSIONS-- | ||
dom | ||
--FILE-- | ||
<?php | ||
$ref = new DOMEntityReference("amp"); | ||
var_dump($ref); | ||
?> | ||
--EXPECT-- | ||
object(DOMEntityReference)#1 (17) { | ||
["nodeName"]=> | ||
string(3) "amp" | ||
["nodeValue"]=> | ||
NULL | ||
["nodeType"]=> | ||
int(5) | ||
["parentNode"]=> | ||
NULL | ||
["parentElement"]=> | ||
NULL | ||
["childNodes"]=> | ||
string(22) "(object value omitted)" | ||
["firstChild"]=> | ||
string(22) "(object value omitted)" | ||
["lastChild"]=> | ||
string(22) "(object value omitted)" | ||
["previousSibling"]=> | ||
NULL | ||
["nextSibling"]=> | ||
NULL | ||
["attributes"]=> | ||
NULL | ||
["isConnected"]=> | ||
bool(false) | ||
["namespaceURI"]=> | ||
NULL | ||
["prefix"]=> | ||
string(0) "" | ||
["localName"]=> | ||
NULL | ||
["baseURI"]=> | ||
NULL | ||
["textContent"]=> | ||
string(0) "" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters