Skip to content

Commit 893b6e6

Browse files
author
Daniel Andre Eikeland
committed
fix php 7.4 array access warning
1 parent 836cfaa commit 893b6e6

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/Resultset.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,7 @@ public function __construct(Statement $statement)
5757
$this->int_ptr = 0;
5858
} elseif ($this->query->isCount()) {
5959
$value = $statement->fetch();
60-
if ($value === false ) {
61-
$this->max_ptr = 0;
62-
} else {
63-
$this->max_ptr = $value['num_col'];
64-
}
60+
$this->max_ptr = $value['num_col'] ?? 0;
6561
}
6662
}
6763
} catch (\Exception $e) {

0 commit comments

Comments
 (0)