From 38666660a0d3b9a91cffb27c0fb519340e76ba5d Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 13 Jan 2015 15:53:25 +0200 Subject: Handle false-positive string values for display_errors --- system/core/Common.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'system') diff --git a/system/core/Common.php b/system/core/Common.php index b5a36636e..71da829d3 100644 --- a/system/core/Common.php +++ b/system/core/Common.php @@ -615,7 +615,7 @@ if ( ! function_exists('_error_handler')) $_error->log_exception($severity, $message, $filepath, $line); // Should we display the error? - if (ini_get('display_errors')) + if (str_ireplace(array('off', 'none', 'no', 'false', 'null'), '', ini_get('display_errors'))) { $_error->show_php_error($severity, $message, $filepath, $line); } @@ -650,7 +650,7 @@ if ( ! function_exists('_exception_handler')) $_error->log_exception('error', 'Exception: '.$exception->getMessage(), $exception->getFile(), $exception->getLine()); // Should we display the error? - if (ini_get('display_errors')) + if (str_ireplace(array('off', 'none', 'no', 'false', 'null'), '', ini_get('display_errors'))) { $_error->show_exception($exception); } -- cgit v1.2.3-24-g4f1b From be676859e18bc1b29c28705bc6902f69aa72c236 Mon Sep 17 00:00:00 2001 From: João Date: Wed, 14 Jan 2015 09:10:41 +0000 Subject: var_export in DB.php outputting string When a DSN string is supplied and it contains parameters such as "db_debug=TRUE", var_export will currently output the parsable string representation of the variable. By setting the second parameter to TRUE, the output is killed. --- system/database/DB.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'system') diff --git a/system/database/DB.php b/system/database/DB.php index fc9f4d0dc..a33627191 100644 --- a/system/database/DB.php +++ b/system/database/DB.php @@ -130,7 +130,7 @@ function &DB($params = '', $query_builder_override = NULL) { if (is_string($val) && in_array(strtoupper($val), array('TRUE', 'FALSE', 'NULL'))) { - $val = var_export($val); + $val = var_export($val, TRUE); } $params[$key] = $val; -- cgit v1.2.3-24-g4f1b