From 5c53973f213b21081d45df39bf0fc89dec9ecad2 Mon Sep 17 00:00:00 2001 From: xue <> Date: Sun, 13 Nov 2005 13:29:44 +0000 Subject: modified how class files are included and errors are handled. --- framework/core.php | 2 +- framework/prado.php | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'framework') diff --git a/framework/core.php b/framework/core.php index dd79914c..66556f0a 100644 --- a/framework/core.php +++ b/framework/core.php @@ -551,7 +551,7 @@ class PradoBase $className=$type; if(!class_exists($className,false)) { - require_once($className.self::CLASS_FILE_EXT); + include_once($className.self::CLASS_FILE_EXT); } if(class_exists($className,false)) return new $className; diff --git a/framework/prado.php b/framework/prado.php index cfd10705..1f0bd7a0 100644 --- a/framework/prado.php +++ b/framework/prado.php @@ -34,7 +34,9 @@ if(!function_exists('__autoload')) { function __autoload($className) { - require_once($className.Prado::CLASS_FILE_EXT); + include_once($className.Prado::CLASS_FILE_EXT); + if(!class_exists($className,false)) + Prado::fatalError("Class file for '$className' cannot be found."); } } -- cgit v1.2.3