facebook / facebook/hhvm

XMLReader isEmptyElement property inconsistent between 4.32 and 4.56

Open
#8,734 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
18.7k
Forks
3.1k
Avg merge
1h 47m
Merged PRs (30d)
2

Description

**Describe the bug**
In hhvm 4.32, isEmptyElement of XMLReader returns true/false
In hhvm 4.56, isEmptyElement of XMLReader returns 1/0

**Standalone code, or other way to reproduce the problem**
```
$input = "";
$myXML = new XmlReader();
$myXML->xml($input);
$readSuccess = $myXML->read();
while ($readSuccess) {
\var_dump($myXML->isEmptyElement);
$readSuccess = $myXML->read();
}
```

**Expected behavior**

The code should have the same output regardless of version.

**Actual behavior**
In hhvm 4.32 and php
```
bool(false)
bool(true)
bool(false)
```

In hhvm 4.56
```
int(0)
int(1)
int(0)
```

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.