From ef285366954231a28bff1428b5f71c4e284dd46d Mon Sep 17 00:00:00 2001 From: Christian Schneider Date: Mon, 5 Sep 2011 16:02:30 +0000 Subject: Autoloader: Check if file is local (does not contain ':', i.e. no protocol like http:) --- it_auto_prepend.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/it_auto_prepend.php b/it_auto_prepend.php index 35014ea..36946ee 100644 --- a/it_auto_prepend.php +++ b/it_auto_prepend.php @@ -177,7 +177,7 @@ function it_convert($source) function it_classloader($classname) { - if ($file = @fopen("$classname.class", "r", true)) # Check for file in include path, do not use @include to get failures on inheritance + if (!preg_match('/:/', $classname) && ($file = @fopen("$classname.class", "r", true))) # Check if file is local (does not contain ':', i.e. no protocol like http:) for file in include path, do not use @include to get failures on inheritance { include("$classname.class"); fclose($file); -- cgit v1.2.3