From dee3cdd25e29de68699aaa9d1b55c546f6d1f568 Mon Sep 17 00:00:00 2001 From: Pavel Shevaev Date: Fri, 27 Oct 2023 11:21:46 +0300 Subject: [PATCH] Fixing missing plugins --- src/bind.inc.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/bind.inc.php b/src/bind.inc.php index e4d88d2..04253f2 100644 --- a/src/bind.inc.php +++ b/src/bind.inc.php @@ -42,9 +42,11 @@ function codegen( { foreach($options['plugins'] as $plugin) $plugin->init($meta, $twig); - - $twig->addGlobal('plugins', $options['plugins']); } + else + $options['plugins'] = array(); + + $twig->addGlobal('plugins', $options['plugins']); return $twig->render('codegen_autobind.twig', $options); }