diff --git a/app/Engine/Cfnpp/Compiler.php b/app/Engine/Cfnpp/Compiler.php index 87d7c10..dfc4e9a 100644 --- a/app/Engine/Cfnpp/Compiler.php +++ b/app/Engine/Cfnpp/Compiler.php @@ -202,7 +202,13 @@ class Compiler implements \App\Engine\ICompile foreach ($variables_ordered as $variable) { $this->runFunctions($variables_raw[$variable]); - $options->setVariable($variable, Node::toPhp($variables_node->getChildByName($variable))); + $variable_node = $variables_node->getChildByName($variable); + // By all accounts this _should_ still exist, but this accounts for the + // case where, say, someone had used !unset on a variable for some reason. + if (isset($variable_node)) + { + $options->setVariable($variable, Node::toPhp($variable_node)); + } } }