From 548a67995dcfa2c2d15198088a8fe9fae751109f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rapha=C3=ABl=20Barrois?= Date: Tue, 19 Oct 2010 23:18:00 +0200 Subject: [PATCH] Fix select_db_table to handle properly 'valeur=0' commands MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit empty() is an evil PHP function: empty($a['x']) is true if $a['x'] == 0... Signed-off-by: Raphaël Barrois --- plugins/function.select_db_table.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/function.select_db_table.php b/plugins/function.select_db_table.php index 80f20a0..f9826fa 100644 --- a/plugins/function.select_db_table.php +++ b/plugins/function.select_db_table.php @@ -57,7 +57,7 @@ function select_options($table, $value, $field, $pad, $where, $join, $group) } function smarty_function_select_db_table($params, &$smarty) { - if (empty($params['table']) || empty($params['valeur'])) { + if (empty($params['table']) || !array_key_exists('valeur', $params)) { return; } if (empty($params['champ'])) { -- 2.1.4