From 7d9af9ad1cbe819d8c6dc0e5e6faf1e79d16e7b5 Mon Sep 17 00:00:00 2001 From: BSc Vassil Nikolov Date: Sun, 16 Nov 2014 18:48:33 +0200 Subject: [PATCH] #88 greedy autoload.php --- autoload.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/autoload.php b/autoload.php index 31093ea..793bdf5 100644 --- a/autoload.php +++ b/autoload.php @@ -2,6 +2,12 @@ function autoload($className) { + $prefix = 'Paymill\\'; + $len = strlen($prefix); + if (strncmp($prefix, $className, $len) !== 0) { + return; + } + $className = ltrim($className, "\\"); $fileName = ''; $namespace = '';