Skip to content

Commit

Permalink
fix php 7.4 array access warning
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Andre Eikeland committed Oct 5, 2020
1 parent 836cfaa commit 893b6e6
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/Resultset.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,7 @@ public function __construct(Statement $statement)
$this->int_ptr = 0;
} elseif ($this->query->isCount()) {
$value = $statement->fetch();
if ($value === false ) {
$this->max_ptr = 0;
} else {
$this->max_ptr = $value['num_col'];
}
$this->max_ptr = $value['num_col'] ?? 0;
}
}
} catch (\Exception $e) {
Expand Down

0 comments on commit 893b6e6

Please sign in to comment.