From a6757bce4dab1051918ae1be24b44da8f7ed5e23 Mon Sep 17 00:00:00 2001 From: sparkyx Date: Sun, 18 Dec 2022 00:32:28 +0100 Subject: [PATCH] Correct return value of Table_Data_SQL->load : false if nothing found --- include/lib/table_data_sql.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/lib/table_data_sql.class.php b/include/lib/table_data_sql.class.php index da1078f20..4c55b377f 100644 --- a/include/lib/table_data_sql.class.php +++ b/include/lib/table_data_sql.class.php @@ -188,13 +188,14 @@ abstract class Table_Data_SQL extends Data_SQL if ($this->cn->count()==0) { $this->$pk=-1; - return true; + return false; } foreach ($result[0] as $key=> $value) { $this->$key=$value; } + return true; }