Skip to content

Commit f61b41d

Browse files
committed
fix: normailze params
If you call view_cell() with param ['param1' => 'value1'], and call with param 'param1=value1', they should be one cache.
1 parent 6d13ca9 commit f61b41d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

system/View/Cell.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,8 @@ public function render(string $library, $params = null, int $ttl = 0, ?string $c
7979
? get_class($instance)
8080
: null;
8181

82+
$params = $this->prepareParams($params);
83+
8284
// Is the output cached?
8385
$cacheName = ! empty($cacheName)
8486
? $cacheName
@@ -96,8 +98,6 @@ public function render(string $library, $params = null, int $ttl = 0, ?string $c
9698
throw ViewException::forInvalidCellMethod($class, $method);
9799
}
98100

99-
$params = $this->prepareParams($params);
100-
101101
$output = $instance instanceof BaseCell
102102
? $this->renderCell($instance, $method, $params)
103103
: $this->renderSimpleClass($instance, $method, $params, $class);

0 commit comments

Comments
 (0)