Skip to content

Commit

Permalink
UIMacros: {snippet} and {snippetArea} without name has name '' in bot…
Browse files Browse the repository at this point in the history
…h PHP 5 and PHP 7
  • Loading branch information
dg committed Jul 1, 2015
1 parent 18aa813 commit 183b869
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Bridges/ApplicationLatte/UIRuntime.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ public static function renderSnippets(UI\Control $control, \stdClass $local, arr
$payload = $control->getPresenter()->getPayload();
if (isset($local->blocks)) {
foreach ($local->blocks as $name => $function) {
if ($name[0] !== '_' || !$control->isControlInvalid(substr($name, 1))) {
if ($name[0] !== '_' || !$control->isControlInvalid((string) substr($name, 1))) {
continue;
}
ob_start();
$function = reset($function);
$snippets = $function($local, $params + ['_snippetMode' => TRUE]);
$payload->snippets[$id = $control->getSnippetId(substr($name, 1))] = ob_get_clean();
$payload->snippets[$id = $control->getSnippetId((string) substr($name, 1))] = ob_get_clean();
if ($snippets !== NULL) { // pass FALSE from snippetArea
if ($snippets) {
$payload->snippets += $snippets;
Expand Down

0 comments on commit 183b869

Please sign in to comment.