Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions system/View/Parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,14 @@ public function render(string $view, ?array $options = null, ?bool $saveData = n
$cacheName = $options['cache_name'] ?? str_replace('.php', '', $view);

// Was it cached?
if (isset($options['cache']) && ($output = cache($cacheName))) {
$this->logPerformance($start, microtime(true), $view);
if (isset($options['cache'])) {
$output = cache($cacheName);

if (is_string($output) && $output !== '') {
$this->logPerformance($start, microtime(true), $view);

return $output;
return $output;
}
}

$file = $this->viewPath . $view;
Expand Down
4 changes: 3 additions & 1 deletion system/View/View.php
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,9 @@ public function render(string $view, ?array $options = null, ?bool $saveData = n

$this->renderVars['cacheName'] = $cacheName;

if ($output = cache($this->renderVars['cacheName'])) {
$output = cache($this->renderVars['cacheName']);

if (is_string($output) && $output !== '') {
$this->logPerformance(
$this->renderVars['start'],
microtime(true),
Expand Down
8 changes: 0 additions & 8 deletions utils/phpstan-baseline/booleanAnd.rightNotBoolean.neon

This file was deleted.

8 changes: 0 additions & 8 deletions utils/phpstan-baseline/if.condNotBoolean.neon

This file was deleted.

4 changes: 1 addition & 3 deletions utils/phpstan-baseline/loader.neon
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
# total 3264 errors
# total 3262 errors
includes:
- argument.type.neon
- assign.propertyType.neon
- booleanAnd.rightNotBoolean.neon
- codeigniter.cacheHandlerInstance.neon
- codeigniter.getReassignArray.neon
- codeigniter.modelArgumentType.neon
- codeigniter.superglobalAccess.neon
- codeigniter.superglobalAccessAssign.neon
- deadCode.unreachable.neon
- empty.notAllowed.neon
- if.condNotBoolean.neon
- method.alreadyNarrowedType.neon
- method.childParameterType.neon
- method.childReturnType.neon
Expand Down
Loading