Skip to content

Commit b1c5aea

Browse files
committed
not introduce new variable
1 parent 7112532 commit b1c5aea

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

system/View/Parser.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,13 +129,12 @@ public function render(string $view, array $options = null, $saveData = null): s
129129
$saveData = $this->config->saveData;
130130
}
131131

132-
$template = str_replace('.php', '', $view);
133-
$view = $template . '.php';
132+
$view = str_replace('.php', '', $view);
134133

135134
// Was it cached?
136135
if (isset($options['cache']))
137136
{
138-
$cacheName = $options['cache_name'] ?: $template;
137+
$cacheName = $options['cache_name'] ?: $view;
139138

140139
if ($output = cache($cacheName))
141140
{
@@ -144,6 +143,7 @@ public function render(string $view, array $options = null, $saveData = null): s
144143
}
145144
}
146145

146+
$view = $view . '.php';
147147
$file = $this->viewPath . $view;
148148

149149
if ( ! file_exists($file))

0 commit comments

Comments
 (0)