Problem/Motivation
Noticed this error yesterday after upgrading to 10.5.10:
Twig\Error\SyntaxError: An exception has been thrown during the compilation of a template (""Drupal\opigno_learning_path\TwigExtension\DefaultTwigExtension::getOperators()" must return an array of 2 elements, got 0.")
Proposed resolution
diff --git a/src/TwigExtension/DefaultTwigExtension.php b/src/TwigExtension/DefaultTwigExtension.php
index b2fa111..f6e0436 100644
--- a/src/TwigExtension/DefaultTwigExtension.php
+++ b/src/TwigExtension/DefaultTwigExtension.php
@@ -167,7 +167,8 @@ class DefaultTwigExtension extends AbstractExtension {
* {@inheritdoc}
*/
public function getOperators() {
- return [];
+ return [[], []];
}
| Comment | File | Size | Author |
|---|---|---|---|
| opigno_learning_path_twig_getoperators_shape.patch | 476 bytes | mizage@gmail.com |
Comments