mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-12 10:26:32 +00:00
12 lines
411 B
Plaintext
12 lines
411 B
Plaintext
--TEST--
|
|
"block" calling parent() with no definition in parent template
|
|
--TEMPLATE--
|
|
{% extends "parent.twig" %}
|
|
{% block label %}{{ parent() }}{% endblock %}
|
|
--TEMPLATE(parent.twig)--
|
|
{{ block('label') }}
|
|
--DATA--
|
|
return []
|
|
--EXCEPTION--
|
|
Twig\Error\RuntimeError: Block "label" should not call parent() in "index.twig" as the block does not exist in the parent template "parent.twig" in "index.twig" at line 3.
|