mirror of
https://github.com/php/php-src.git
synced 2024-10-18 23:12:35 +00:00
17 lines
385 B
Plaintext
17 lines
385 B
Plaintext
|
--TEST--
|
||
|
Bug #41582 (SimpleXML crashes when accessing newly created element)
|
||
|
--FILE--
|
||
|
<?php
|
||
|
|
||
|
$xml = new SimpleXMLElement('<?xml version="1.0" standalone="yes"?>
|
||
|
<collection></collection>');
|
||
|
|
||
|
$xml->movie[]->characters->character[0]->name = 'Miss Coder';
|
||
|
|
||
|
var_dump($xml->asXml());
|
||
|
|
||
|
echo "Done\n";
|
||
|
?>
|
||
|
--EXPECTF--
|
||
|
Fatal error: Cannot use object of type stdClass as array in %s on line %d
|