Commit 30dc0033 authored by Bogdan Mucenica's avatar Bogdan Mucenica 🏍

remove tail slash

parent 1c5cc29e
......@@ -47,7 +47,11 @@
$path = str_replace('\\', '/', substr($className, strlen($namespace)));
$lastFileSeparatorPosition = strrpos($path, '/');
$fileName = substr($path, $lastFileSeparatorPosition);
if($basePath{strlen($basePath) - 1} == '/') {
$basePath = substr($basePath, 0, -1);
}
$requirePath = $basePath . '/' . strtolower(substr($path, 0, $lastFileSeparatorPosition)) . $fileName . '.php';
if (file_exists($requirePath)) {
require($requirePath);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment