facebook / facebook/hhvm

SimpleXMLElement adding children incompatibility

Open
#6,917 3 comments 0 reactions 0 assignees View on GitHub
mid-pri php5 incompatibility
Dominant language
C++
Stars
18.7k
Forks
3.1k
Avg merge
1h 47m
Merged PRs (30d)
2

Description

### HHVM Version

HipHop VM 3.12.1 (rel)
Compiler: tags/HHVM-3.12.1-0-gf516f1bb9046218f89885a220354c19dda6d8f4d
Repo schema: f2e5f39b2ad4a08bcbd90b5d8bcb580f40fba6c8
### Standalone code, or other way to reproduce the problem

``` php
');
$xml->Child->Sub->OtherSub = "Sub's data";
echo $xml->Child->Sub->OtherSub; // Sub's data
```
### Expected result

Sub's data
### Actual result

Warning: Creating default object from empty value in /var/www/test.php on line 3
Notice: Cannot access property on non-object in /var/www/test.php on line 4

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.