From fa69ce339de3433e03489fece7c4aa20dca00851 Mon Sep 17 00:00:00 2001 From: "Namhyeon, Go" Date: Tue, 26 Feb 2019 11:34:49 +0900 Subject: [PATCH] Update database.oracle.php --- helper/database.oracle.php | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/helper/database.oracle.php b/helper/database.oracle.php index eb3939c..6322b56 100644 --- a/helper/database.oracle.php +++ b/helper/database.oracle.php @@ -71,11 +71,17 @@ if(!check_valid_function("exec_db_oracle_fetch_all")) { function exec_db_oracle_fetch_all($sql, $bind, $conn) { $rows = array(); - $required_functions = array("oci_parse", "oci_execute", "oci_fetch_assoc", "oci_free_statement"); - foreach($required_functions as $func_name) { - if(!check_valid_function($func_name)) { - exit("OCI (Oracle Extension for PHP) not installed!"); - } + $fn = array( + "NO_FUNCTION_OCI_PARSE" => "oci_parse", + "NO_FUNCTION_OCI_EXECUTE" => "oci_execute", + "NO_FUNCTION_OCI_FETCH_ASSOC" => "oci_fetch_assoc", + "NO_FUNCTION_OCI_FREE_STATEMENT" => "oci_free_statement", + ); + + $invalid_fn = check_invalid_function($fn); + if($invalid_fn != -1) { + set_error($invalid_fn); + show_errors(); } $stmt = get_db_oracle_stmt($sql, $bind);