修改一处值传递为引用

This commit is contained in:
TOP糯米 2024-07-29 15:24:49 +08:00
parent a504cb1b5c
commit 0f718f798a
1 changed files with 2 additions and 2 deletions

View File

@ -142,10 +142,10 @@ class Engine
/** /**
* 检测是否含有include * 检测是否含有include
* @param $template * @param &$template
* @return bool * @return bool
*/ */
private function hasInclude($template) private function hasInclude(&$template)
{ {
$pattern = '/' . $this->left . 'include\s+file[\s\S]*?=[\s\S]*?[\'"](.*?)[\'"][\s\S]*?\/' . $this->right . '/is'; $pattern = '/' . $this->left . 'include\s+file[\s\S]*?=[\s\S]*?[\'"](.*?)[\'"][\s\S]*?\/' . $this->right . '/is';
preg_match($pattern, $template, $matches); preg_match($pattern, $template, $matches);