From e1cf8a1f997b94c0a13567edea50cf21cdd0a8b6 Mon Sep 17 00:00:00 2001 From: Mike Cao Date: Sat, 11 Jun 2011 05:26:29 -0700 Subject: [PATCH] Changed autoloading to allow other autloaders to run --- flight/Flight.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/flight/Flight.php b/flight/Flight.php index 623f693..15a3389 100644 --- a/flight/Flight.php +++ b/flight/Flight.php @@ -383,7 +383,11 @@ class Flight { require $base.'/'.$file; } else { - throw new Exception('Unable to load file: '.$base.'/'.$file); + $loaders = spl_autoload_functions(); + $last = array_pop($loaders); + if (is_array($last) && $last[0] == __CLASS__ && $last[1] == __FUNCTION__) { + throw new Exception('Unable to load file: '.$base.'/'.$file); + } } }