From da03ea07e91213413bfc6f5c8c8842a0e5b40ec1 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Tue, 25 Jul 2017 17:08:11 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/Template.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/library/think/Template.php b/library/think/Template.php index adc53e18..64ce2841 100644 --- a/library/think/Template.php +++ b/library/think/Template.php @@ -785,6 +785,8 @@ class Template if (isset($array[1])) { $this->parseVar($array[2]); $name = $name . $array[1] . $array[2]; + } else { + $name = '!empty(' . $name . ')'; } $str = ''; }