Skip to content

Commit d75c6eb

Browse files
committed
Incompatibilities with PHP 5.6 and HHVM fixed
1 parent 502aee6 commit d75c6eb

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

src/Pointer/Evaluate/AdvancerIndex.php

+4-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,10 @@ public function advance()
2626

2727
public function write($data)
2828
{
29-
$this->getCursor()->getData()[$this->getKey()] = $data;
29+
$cursorData = &$this
30+
->getCursor()
31+
->getData();
32+
$cursorData[$this->getKey()] = $data;
3033
return $this;
3134
}
3235

src/Pointer/Evaluate/AdvancerNextIndex.php

+3-2
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,10 @@ public function advance()
2020

2121
public function write($data)
2222
{
23-
$this
23+
$cursorData = &$this
2424
->getCursor()
25-
->getData()[] = $data;
25+
->getData();
26+
$cursorData[] = $data;
2627
return $this;
2728
}
2829

0 commit comments

Comments
 (0)