From 82cfaf1ed8196a6e2f8529b42321d5a2cdf61693 Mon Sep 17 00:00:00 2001 From: Julien Rosset Date: Tue, 25 Apr 2023 18:26:23 +0200 Subject: [PATCH] AutoPrefix: fix comparison --- src/CliProgram/AutoPrefix/AutoPrefixNamespaceManager.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CliProgram/AutoPrefix/AutoPrefixNamespaceManager.php b/src/CliProgram/AutoPrefix/AutoPrefixNamespaceManager.php index 134dc2f..1e516e2 100644 --- a/src/CliProgram/AutoPrefix/AutoPrefixNamespaceManager.php +++ b/src/CliProgram/AutoPrefix/AutoPrefixNamespaceManager.php @@ -83,7 +83,7 @@ class AutoPrefixNamespaceManager implements IAutoPrefixManager { $commandClass = new ReflectionClass($command); $commandNamespace = '\\' . $commandClass->getNamespaceName(); - if ($commandNamespace !== $this->getNamespace() && mb_substr($commandNamespace, mb_strlen($this->getNamespace() . '\\')) !== $this->getNamespace() . '\\') { + if ($commandNamespace !== $this->getNamespace() && mb_substr($commandNamespace, 0, mb_strlen($this->getNamespace() . '\\')) !== $this->getNamespace() . '\\') { return null; } return implode(