From ade630d979047922a66727f47d5c88ceeb8a8991 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Fri, 17 Mar 2017 17:13:21 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9Boptimize::schema=E6=8C=87?= =?UTF-8?q?=E4=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/console/command/optimize/Schema.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/think/console/command/optimize/Schema.php b/library/think/console/command/optimize/Schema.php index 6ac38a36..d4d1f0f6 100644 --- a/library/think/console/command/optimize/Schema.php +++ b/library/think/console/command/optimize/Schema.php @@ -42,7 +42,7 @@ class Schema extends Command $list = scandir(APP_PATH . $module . DS . 'model'); $app = App::$namespace; foreach ($list as $file) { - if ('.' == $file || '..' == $file) { + if (0 === strpos($file, '.')) { continue; } $class = '\\' . $app . '\\' . $module . '\\model\\' . pathinfo($file, PATHINFO_FILENAME); @@ -63,7 +63,7 @@ class Schema extends Command $app = App::$namespace; $list = scandir(APP_PATH . 'model'); foreach ($list as $file) { - if ('.' == $file || '..' == $file) { + if (0 === strpos($file, '.')) { continue; } $class = '\\' . $app . '\\model\\' . pathinfo($file, PATHINFO_FILENAME);