From 27b4c5dac140584914df37172d39012d240bd669 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Tue, 19 Jan 2021 18:10:10 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Annotation/Annotation.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Annotation/Annotation.php b/Annotation/Annotation.php index c553c2c9..b7e38bcc 100644 --- a/Annotation/Annotation.php +++ b/Annotation/Annotation.php @@ -82,6 +82,12 @@ class Annotation extends Component foreach ($paths as $path) { $explode = explode('/', $path); + $length = strlen($path); + if ($length != $length - strpos('.php', $path)) { + continue; + } + + $explode_pop = array_pop($explode); if (is_file($path)) { $explode_pop = str_replace('.php', '', $explode_pop);