-
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 getting the address of an uninitialized property of a SimpleXMLEl…
…ement resulting in a crash Closes GH-12945.
- Loading branch information
Showing
3 changed files
with
24 additions
and
0 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
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,17 @@ | ||
--TEST-- | ||
Getting the address of an uninitialized property of a SimpleXMLElement | ||
--EXTENSIONS-- | ||
simplexml | ||
--FILE-- | ||
<?php | ||
|
||
$rc = new ReflectionClass('SimpleXMLElement'); | ||
$sxe = $rc->newInstanceWithoutConstructor(); | ||
$sxe->a['b'] = 'b'; | ||
|
||
?> | ||
--EXPECTF-- | ||
Fatal error: Uncaught Error: SimpleXMLElement is not properly initialized in %s:%d | ||
Stack trace: | ||
#0 {main} | ||
thrown in %s on line %d |