summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorxue <>2005-11-13 13:29:44 +0000
committerxue <>2005-11-13 13:29:44 +0000
commit5c53973f213b21081d45df39bf0fc89dec9ecad2 (patch)
treed9a06ddc145866000b74fa74f3418bfaf8db12d3
parent4c89bb76f70a7d18733f3294753c4940d831c485 (diff)
modified how class files are included and errors are handled.
-rw-r--r--framework/core.php2
-rw-r--r--framework/prado.php4
2 files changed, 4 insertions, 2 deletions
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.");
}
}