From f9ec9064147e2f78d14800e755ee54df25714d96 Mon Sep 17 00:00:00 2001 From: Victor Westerlund Date: Thu, 2 Nov 2023 11:54:05 +0100 Subject: [PATCH] fix: depr. warning when passing null to select() (#18) --- src/MySQL.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/MySQL.php b/src/MySQL.php index f4b5c7d..2d4a937 100644 --- a/src/MySQL.php +++ b/src/MySQL.php @@ -146,7 +146,7 @@ $this->throw_if_no_table(); // Create array of columns from CSV - $columns = is_array($columns) ? $columns : explode(",", $columns); + $columns = is_array($columns) || is_null($columns) ? $columns : explode(",", $columns); // Filter columns that aren't in the model if defiend if ($columns && $this->model) {