From 4112b1a14b7cf704d4a69b27674ef58cb0e4e7df Mon Sep 17 00:00:00 2001 From: sparkyx Date: Thu, 22 May 2025 00:04:38 +0200 Subject: [PATCH] Data_SQL if column doesn't exist --- include/lib/data_sql.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/lib/data_sql.class.php b/include/lib/data_sql.class.php index 03e336efc..ba4512cf8 100644 --- a/include/lib/data_sql.class.php +++ b/include/lib/data_sql.class.php @@ -254,7 +254,7 @@ abstract class Data_SQL $this->$cols=$p_value; return $this; } - if (array_key_exists($cols, $this->a_virtual_col)) + if ( ! empty ($this->a_virtual_col) && array_key_exists($cols, $this->a_virtual_col)) { $this->$cols=$p_value; return $this; @@ -266,7 +266,7 @@ abstract class Data_SQL if (array_key_exists($cols, $this->type)) { return $this->$cols; } - if (array_key_exists($cols, $this->a_virtual_col)) + if (! empty ($this->a_virtual_col) && array_key_exists($cols, $this->a_virtual_col)) { return $this->$cols; }