From b630b73f1d08601fc7cbb401c9f0d5d82d766039 Mon Sep 17 00:00:00 2001 From: Pavel Date: Mon, 24 Jun 2019 10:57:52 +0300 Subject: [PATCH] Fix for classpath builder --- src/Bot/Client.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/Bot/Client.php b/src/Bot/Client.php index 31f513c..773276b 100644 --- a/src/Bot/Client.php +++ b/src/Bot/Client.php @@ -119,13 +119,17 @@ class Client */ private static function concatClasspath($fromRoot, ...$classes) { - $path = $fromRoot ? '\\' : ''; + $path = ''; foreach ($classes as $class) { - $path .= '\\' . $class; + if (empty($path) && !$fromRoot) { + $path .= $class; + } else { + $path .= '\\' . $class; + } } - return str_replace('\\\\', '\\', $path); + return $path; } /**