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); }