From cf28370b89d6e3e14e3c178c83cb47ea77d3a471 Mon Sep 17 00:00:00 2001 From: Sergei Predvoditelev Date: Wed, 19 Jun 2024 22:13:36 +0300 Subject: [PATCH] Update src/ViewRenderer.php --- src/ViewRenderer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ViewRenderer.php b/src/ViewRenderer.php index 001056e..32ea07a 100644 --- a/src/ViewRenderer.php +++ b/src/ViewRenderer.php @@ -541,7 +541,7 @@ private function extractControllerName(object $controller): string return $cache[$class]; } - if (preg_match('/.*controllers?\\\([\w\\\]+)controller$/iU', $class, $m) && !empty($m[1])) { + if (preg_match('/(?:.*controllers?\\\)([\w\\\]+)controller$/iU', $class, $m) && !empty($m[1])) { $name = $m[1]; } elseif (preg_match('/(\w+)controller$/iU', $class, $m) && !empty($m[1])) { $name = $m[1];