From 268e7d54612bb7add50dd8a3d1ca26556c8dab1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E6=99=AF=E7=AB=8B?= Date: Tue, 12 Jan 2021 14:24:46 +0800 Subject: [PATCH] ComposerUpdate --- vendor/composer/installed.json | 18 +++++++----------- vendor/services.php | 2 +- .../topthink/think-template/src/Template.php | 14 ++++++++++++-- 3 files changed, 20 insertions(+), 14 deletions(-) diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index 1bf3cd087..c06407c90 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -709,17 +709,17 @@ }, { "name": "topthink/think-template", - "version": "v2.0.7", - "version_normalized": "2.0.7.0", + "version": "v2.0.8", + "version_normalized": "2.0.8.0", "source": { "type": "git", "url": "https://github.com/top-think/think-template.git", - "reference": "e98bdbb4a4c94b442f17dfceba81e0134d4fbd19" + "reference": "abfc293f74f9ef5127b5c416310a01fe42e59368" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/top-think/think-template/zipball/e98bdbb4a4c94b442f17dfceba81e0134d4fbd19", - "reference": "e98bdbb4a4c94b442f17dfceba81e0134d4fbd19", + "url": "https://api.github.com/repos/top-think/think-template/zipball/abfc293f74f9ef5127b5c416310a01fe42e59368", + "reference": "abfc293f74f9ef5127b5c416310a01fe42e59368", "shasum": "", "mirrors": [ { @@ -732,7 +732,7 @@ "php": ">=7.1.0", "psr/simple-cache": "^1.0" }, - "time": "2019-09-20T15:31:04+00:00", + "time": "2020-12-10T07:52:03+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -750,11 +750,7 @@ "email": "liu21st@gmail.com" } ], - "description": "the php template engine", - "support": { - "issues": "https://github.com/top-think/think-template/issues", - "source": "https://github.com/top-think/think-template/tree/v2.0.7" - } + "description": "the php template engine" }, { "name": "topthink/think-view", diff --git a/vendor/services.php b/vendor/services.php index a657dad5b..aa839cf85 100644 --- a/vendor/services.php +++ b/vendor/services.php @@ -1,5 +1,5 @@ 'think\\admin\\Library', diff --git a/vendor/topthink/think-template/src/Template.php b/vendor/topthink/think-template/src/Template.php index 84d35a528..0feca8e20 100644 --- a/vendor/topthink/think-template/src/Template.php +++ b/vendor/topthink/think-template/src/Template.php @@ -245,7 +245,11 @@ class Template // 页面缓存 ob_start(); - ob_implicit_flush(0); + if (PHP_VERSION > 8.0) { + ob_implicit_flush(false); + } else { + ob_implicit_flush(0); + } // 读取编译存储 $this->storage->read($cacheFile, $this->data); @@ -345,7 +349,13 @@ class Template } // 读取第一行 - preg_match('/\/\*(.+?)\*\//', fgets($handle), $matches); + $line = fgets($handle); + + if (false === $line) { + return false; + } + + preg_match('/\/\*(.+?)\*\//', $line, $matches); if (!isset($matches[1])) { return false;