Skip to content

Commit 6e4cfc4

Browse files
committed
Merge pull request theseer#24 from easybiblabs/hhvm-3-2-compat
Make hhvm 3.2.0 happy
2 parents 6e9ad7b + af7067b commit 6e4cfc4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/fDOMXPath.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public function prepare($xpath, array $valueMap) {
7171

7272
public function query($q, \DOMNode $ctx = null, $registerNodeNS = true) {
7373
libxml_clear_errors();
74-
if (version_compare(PHP_VERSION, '5.3.3', '<') || strpos(PHP_VERSION, 'hiphop')) {
74+
if (version_compare(PHP_VERSION, '5.3.3', '<') || strpos(PHP_VERSION, 'hiphop') || strpos(PHP_VERSION, 'hhvm')) {
7575
$rc = parent::query($q, ($ctx instanceof \DOMNode) ? $ctx : $this->doc->documentElement);
7676
} else {
7777
$rc = parent::query($q, ($ctx instanceof \DOMNode) ? $ctx : $this->doc->documentElement, $registerNodeNS);
@@ -85,7 +85,7 @@ public function query($q, \DOMNode $ctx = null, $registerNodeNS = true) {
8585

8686
public function evaluate($q, \DOMNode $ctx = null, $registerNodeNS = true) {
8787
libxml_clear_errors();
88-
if (version_compare(PHP_VERSION, '5.3.3', '<') || strpos(PHP_VERSION, 'hiphop')) {
88+
if (version_compare(PHP_VERSION, '5.3.3', '<') || strpos(PHP_VERSION, 'hiphop') || strpos(PHP_VERSION, 'hhvm')) {
8989
$rc = parent::evaluate($q, ($ctx instanceof \DOMNode) ? $ctx : $this->doc->documentElement);
9090
} else {
9191
$rc = parent::evaluate($q, ($ctx instanceof \DOMNode) ? $ctx : $this->doc->documentElement, $registerNodeNS);

0 commit comments

Comments
 (0)