summaryrefslogtreecommitdiffstats
path: root/tests/mocks
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-06-28 13:08:40 +0200
committerAndrey Andreev <narf@bofh.bg>2012-06-28 13:08:40 +0200
commit89db8ee4c16c5cdd589e51f27fcd3fc23cf41aae (patch)
tree0a667b4e332fe5181bba4531d025740bc892821a /tests/mocks
parentcbd78d826b965ad6dfc953686594749cbdf21af3 (diff)
parentd580999cead0aa37d705c2f32e02712a2d522deb (diff)
Merge branch 'develop' of github.com:EllisLab/CodeIgniter into feature/db_subdrivers
Diffstat (limited to 'tests/mocks')
-rw-r--r--tests/mocks/autoloader.php11
1 files changed, 8 insertions, 3 deletions
diff --git a/tests/mocks/autoloader.php b/tests/mocks/autoloader.php
index e3ff7a8bd..be1c2220c 100644
--- a/tests/mocks/autoloader.php
+++ b/tests/mocks/autoloader.php
@@ -69,16 +69,21 @@ function autoload($class)
}
}
- $file = isset($file) ? $file : $dir.$class.'.php';
+ $file = (isset($file)) ? $file : $dir.$class.'.php';
if ( ! file_exists($file))
{
$trace = debug_backtrace();
- // If the autoload call came from `class_exists` or `file_exists`,
- // we skipped and return FALSE
if ($trace[2]['function'] === 'class_exists' OR $trace[2]['function'] === 'file_exists')
{
+ // If the autoload call came from `class_exists` or `file_exists`,
+ // we skipped and return FALSE
+ return FALSE;
+ }
+ elseif (($autoloader = spl_autoload_functions()) && end($autoloader) !== __FUNCTION__)
+ {
+ // If there was other custom autoloader, passed away
return FALSE;
}