Skip to content

Commit de129dc

Browse files
authored
Merge pull request #7758 from kenjis/fix-Pager-View
fix: [Pager] knocks down variables for View
2 parents bfbd4f9 + ef5361d commit de129dc

File tree

4 files changed

+7
-10
lines changed

4 files changed

+7
-10
lines changed

phpstan-baseline.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2696,10 +2696,5 @@
26962696
'count' => 1,
26972697
'path' => __DIR__ . '/system/View/View.php',
26982698
];
2699-
$ignoreErrors[] = [
2700-
'message' => '#^Property CodeIgniter\\\\View\\\\View\\:\\:\\$tempData has no type specified\\.$#',
2701-
'count' => 1,
2702-
'path' => __DIR__ . '/system/View/View.php',
2703-
];
27042699

27052700
return ['parameters' => ['ignoreErrors' => $ignoreErrors]];

system/Config/Services.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ public static function pager(?PagerConfig $config = null, ?RendererInterface $vi
445445
}
446446

447447
$config ??= config(PagerConfig::class);
448-
$view ??= AppServices::renderer();
448+
$view ??= AppServices::renderer(null, null, false);
449449

450450
return new Pager($config, $view);
451451
}

system/Pager/Pager.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ protected function displayLinks(string $group, string $template): string
123123
$pager = new PagerRenderer($this->getDetails($group));
124124

125125
return $this->view->setVar('pager', $pager)
126-
->render($this->config->templates[$template], null, false);
126+
->render($this->config->templates[$template]);
127127
}
128128

129129
/**

system/View/View.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,16 @@ class View implements RendererInterface
2929
use ViewDecoratorTrait;
3030

3131
/**
32-
* Data that is made available to the Views.
32+
* Saved Data.
3333
*
3434
* @var array
3535
*/
3636
protected $data = [];
3737

3838
/**
39-
* Merge savedData and userData
39+
* Data for the variables that are available in the Views.
40+
*
41+
* @var array|null
4042
*/
4143
protected $tempData;
4244

@@ -48,7 +50,7 @@ class View implements RendererInterface
4850
protected $viewPath;
4951

5052
/**
51-
* The render variables
53+
* Data for rendering including Caching and Debug Toolbar data.
5254
*
5355
* @var array
5456
*/

0 commit comments

Comments
 (0)