From 57b3d39cb79bb3b8d193e0e345a62e3396e519f2 Mon Sep 17 00:00:00 2001 From: admin Date: Sun, 27 Aug 2006 15:28:31 +0000 Subject: --- system/codeigniter/Common.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'system/codeigniter') diff --git a/system/codeigniter/Common.php b/system/codeigniter/Common.php index 4879e7099..d5bec77fe 100644 --- a/system/codeigniter/Common.php +++ b/system/codeigniter/Common.php @@ -153,8 +153,10 @@ function show_404($page = '') * @access public * @return void */ -function log_message($level = 2, $message, $php_error = FALSE) +function log_message($level = 'error', $message, $php_error = FALSE) { + static $LOG; + $config =& _get_config(); if ($config['log_errors'] === FALSE) { @@ -166,7 +168,7 @@ function log_message($level = 2, $message, $php_error = FALSE) include_once(BASEPATH.'libraries/Log.php'); } - if ( ! isset($LOG)) + if ( ! is_object($LOG)) { $LOG = new CI_Log( $config['log_path'], -- cgit v1.2.3-24-g4f1b