Bug #3443

Unreachable code in TemplateView

Added by Bastian Waidelich over 12 years ago. Updated about 11 years ago.

Status:
Resolved
Priority:
Should have
Category:
Core
Target version:
Start date:
2009-05-25
Due date:
% Done:

100%

Estimated time:
Has patch:

Description

line 246 in F3\Fluid\View\TemplateView can never be reached as there is a return before that:

        return $parsedTemplate->render($renderingContext);

        // TODO -> Never executed???
        if ($sectionToRender !== NULL) {
            $sections = $partial->getVariableContainer()->get('sections');
            if(!array_key_exists($sectionToRender, $sections)) {
                throw new \F3\Fluid\Core\RuntimeException('The given section does not exist!', 1227108983);
            }
            $syntaxTree = $sections[$sectionToRender];
        } else {
            $syntaxTree = $partial->getRootNode();
        }
        $syntaxTree->setRenderingContext($renderingContext);
        return $syntaxTree->evaluate();
#1

Updated by Robert Lemke over 12 years ago

  • Category set to Core
  • Target version set to 1.0.0 alpha 3
  • % Done changed from 0 to 90

I roughly fixed this in r2873, however the partials rendering mechanism still needs to be checked by Sebastian.

#2

Updated by Sebastian Kurfuerst over 12 years ago

  • Status changed from New to Resolved
  • % Done changed from 90 to 100

resolved a while ago by completely rewriting the TemplateView

Also available in: Atom PDF