From f80331e28955daa16c2ac5a3c2a386221ee574a9 Mon Sep 17 00:00:00 2001 From: "Namhyeon, Go" Date: Fri, 24 May 2019 16:28:09 +0900 Subject: [PATCH] Update database.php --- system/database.php | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/system/database.php b/system/database.php index deb9cbd..0a94ba5 100644 --- a/system/database.php +++ b/system/database.php @@ -88,10 +88,9 @@ if(!function_exists("compare_db_key_length")) { } if(!function_exists("get_db_binded_sql")) { - function get_db_binded_sql($sql, $bind) { - if(is_array($bind) && check_array_length($bind, 0) > 0) { - $bind_keys = array_keys($bind); - if(is_array($bind_key) && check_array_length($bind_key, 0) > 0) { + function get_db_binded_sql($sql, $bind=array()) { + $bind_keys = get_array(array_keys($bind)); + if(check_array_length($bind_keys, 0) > 0) { // 2018-08-19: support lower php version (not supported anonymous function) usort($bind_keys, "compare_db_key_length"); @@ -100,8 +99,6 @@ if(!function_exists("get_db_binded_sql")) { $sql = str_replace(":" . $k, "'" . addslashes($bind[$k]) . "'", $sql); } } - } - return $sql; } }