1 | <?php |
||
14 | class TwigEngine extends AbstractEngine |
||
15 | { |
||
16 | const DEFAULT_CACHE_PATH = '../cache/twig'; |
||
17 | |||
18 | /** |
||
19 | * @var Twig_Environment $twig |
||
20 | */ |
||
21 | private $twig; |
||
22 | |||
23 | /** |
||
24 | * @return string |
||
25 | */ |
||
26 | public function type() |
||
30 | |||
31 | /** |
||
32 | * @return Twig_Environment |
||
33 | */ |
||
34 | public function twig() |
||
41 | |||
42 | /** |
||
43 | * @return Twig_Environment |
||
44 | */ |
||
45 | protected function createTwig() |
||
55 | |||
56 | /** |
||
57 | * Set the engine's cache implementation. |
||
58 | * |
||
59 | * @param mixed $cache A Twig cache option. |
||
60 | * @return void |
||
61 | */ |
||
62 | protected function setCache($cache) |
||
74 | |||
75 | /** |
||
76 | * @param string $templateIdent The template identifier to load and render. |
||
77 | * @param mixed $context The rendering context. |
||
78 | * @return string The rendered template string. |
||
79 | */ |
||
80 | public function render($templateIdent, $context) |
||
85 | |||
86 | /** |
||
87 | * @param string $templateString The template string to render. |
||
88 | * @param mixed $context The rendering context. |
||
89 | * @return string The rendered template string. |
||
90 | */ |
||
91 | public function renderTemplate($templateString, $context) |
||
97 | } |
||
98 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: