From 893b6e6d007a904a67b2f0550b63f2739782d64c Mon Sep 17 00:00:00 2001 From: Daniel Andre Eikeland Date: Mon, 5 Oct 2020 12:32:06 +0200 Subject: [PATCH] fix php 7.4 array access warning --- src/Resultset.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/Resultset.php b/src/Resultset.php index 55e705c..eefda1f 100644 --- a/src/Resultset.php +++ b/src/Resultset.php @@ -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) {