From: Raphaël Barrois Date: Tue, 19 Oct 2010 21:18:00 +0000 (+0200) Subject: Fix select_db_table to handle properly 'valeur=0' commands X-Git-Tag: core/1.1.1~1 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=548a67995dcfa2c2d15198088a8fe9fae751109f;p=platal.git Fix select_db_table to handle properly 'valeur=0' commands empty() is an evil PHP function: empty($a['x']) is true if $a['x'] == 0... Signed-off-by: Raphaël Barrois --- 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'])) {