Skip 'partial not found' error or exception. Use this to align with mustache specification.
Error when compile() and partial not found
Used option: FLAG_ERROR_LOG
NULL
Command failed: php .exec_tmp_file2>&1
require('./vendor/autoload.php');
use LightnCandy\LightnCandy;
$template = "{{> not_found}}";
$php = LightnCandy::compile($template, array(
"flags" => LightnCandy::FLAG_ERROR_LOG
));
Skip the error
Used option: FLAG_ERROR_EXCEPTION FLAG_ERROR_SKIPPARTIAL
NULL
OK
!
Command failed: php .exec_tmp_file 2>/dev/null
require('./vendor/autoload.php');
use LightnCandy\LightnCandy;
$template = "OK{{> not_found}}!";
$php = LightnCandy::compile($template, array(
"flags" => LightnCandy::FLAG_ERROR_EXCEPTION | LightnCandy::FLAG_ERROR_SKIPPARTIAL
));
$render = LightnCandy::prepare($php);
$data = NULL;
echo $render($data);