Skip to content

Commit e74dc7c

Browse files
authored
Merge pull request #13 from sandrokeil/bugfix/undefined-property
Fix undefined property $handle
2 parents 41953bc + 0a257ab commit e74dc7c

File tree

4 files changed

+14
-8
lines changed

4 files changed

+14
-8
lines changed

CHANGELOG.md

+12
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,18 @@
1010

1111
### Fixed
1212

13+
## 0.3.1 (2020-07-14)
14+
15+
### Added
16+
17+
### Deprecated
18+
19+
### Removed
20+
21+
### Fixed
22+
23+
* Undefined property `$handle` in `\ArangoDb\Http\Client`
24+
1325
## 0.3.0 (2020-07-07)
1426

1527
### Added

composer.json

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
"arangodb",
88
"http",
99
"client",
10-
"vpack",
1110
"json",
1211
"php"
1312
],

src/Http/Client.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,6 @@ private function open(RequestInterface $request): void
359359
private function close(): void
360360
{
361361
fclose($this->handle);
362-
unset($this->handle);
362+
$this->handle = null; // @phpstan-ignore-line
363363
}
364364
}

src/Statement/ArrayAccessStreamHandlerTrait.php

+1-6
Original file line numberDiff line numberDiff line change
@@ -84,12 +84,7 @@ public function next(): void
8484
*/
8585
public function valid(): bool
8686
{
87-
if ($this->position <= $this->length - 1) {
88-
// we have more results than the current position is
89-
return true;
90-
}
91-
92-
return ($this->position <= $this->length - 1);
87+
return $this->position <= $this->length - 1;
9388
}
9489

9590
public function writesExecuted(): ?int

0 commit comments

Comments
 (0)