noalyss-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Noalyss-commit] [noalyss] 13/32: Correct return value of Table_Data_SQL


From: Dany De Bontridder
Subject: [Noalyss-commit] [noalyss] 13/32: Correct return value of Table_Data_SQL->load : false if nothing found
Date: Thu, 5 Jan 2023 14:18:30 -0500 (EST)

sparkyx pushed a commit to branch devel
in repository noalyss.

commit a6757bce4dab1051918ae1be24b44da8f7ed5e23
Author: sparkyx <danydb@noalyss.eu>
AuthorDate: Sun Dec 18 00:32:28 2022 +0100

    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;
     }
 
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]