Skip to content

Commit

Permalink
Merge pull request #13 from sandrokeil/bugfix/undefined-property
Browse files Browse the repository at this point in the history
Fix undefined property $handle
  • Loading branch information
sandrokeil authored Jul 14, 2020
2 parents 41953bc + 0a257ab commit e74dc7c
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 8 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,18 @@

### Fixed

## 0.3.1 (2020-07-14)

### Added

### Deprecated

### Removed

### Fixed

* Undefined property `$handle` in `\ArangoDb\Http\Client`

## 0.3.0 (2020-07-07)

### Added
Expand Down
1 change: 0 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
"arangodb",
"http",
"client",
"vpack",
"json",
"php"
],
Expand Down
2 changes: 1 addition & 1 deletion src/Http/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,6 @@ private function open(RequestInterface $request): void
private function close(): void
{
fclose($this->handle);
unset($this->handle);
$this->handle = null; // @phpstan-ignore-line
}
}
7 changes: 1 addition & 6 deletions src/Statement/ArrayAccessStreamHandlerTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,7 @@ public function next(): void
*/
public function valid(): bool
{
if ($this->position <= $this->length - 1) {
// we have more results than the current position is
return true;
}

return ($this->position <= $this->length - 1);
return $this->position <= $this->length - 1;
}

public function writesExecuted(): ?int
Expand Down

0 comments on commit e74dc7c

Please sign in to comment.