From 32457c5f97351d40ad5965abc3ad39accc7730bc Mon Sep 17 00:00:00 2001 From: Benjamin Renard Date: Sat, 25 Feb 2023 17:19:39 +0100 Subject: [PATCH] example: fix small error report by phpstan --- example/includes/db.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/example/includes/db.php b/example/includes/db.php index 59f740f..cbeae5c 100644 --- a/example/includes/db.php +++ b/example/includes/db.php @@ -99,7 +99,7 @@ function update_item($id, $changes) { $item = get_item($id, true); if (!is_array($item)) return false; - if (isset($changes['date']) && !is_null($changes['date'])) + if (isset($changes['date']) && $changes['date']) $changes['date'] = $db -> time2datetime($changes['date']); try {