在“ COTerminalBundle.html.twig”中的模板的编译过程中引发了异常(“ Function()不存在”)

时间:2018-11-08 05:10:09

标签: symfony twig

我最近将我的Symfony项目从2.4更新到了2.8,现在从3.4更新了。

登录并重定向到下一页后出现此错误。

这是堆栈跟踪

Position

当我追溯它时,变量$ callable变为null。我不确定是在树枝上还是在symfony上,这是错误。

编辑:

这是我的default.html.twig

ReflectionException:
Function () does not exist

  at vendor\twig\twig\lib\Twig\Node\Expression\Call.php:288
  at ReflectionFunction->__construct('')
     (vendor\twig\twig\lib\Twig\Node\Expression\Call.php:288)
  at Twig_Node_Expression_Call->reflectCallable(null)
     (vendor\twig\twig\lib\Twig\Node\Expression\Call.php:23)
  at Twig_Node_Expression_Call->compileCallable(object(Twig_Compiler))
     (vendor\twig\twig\lib\Twig\Node\Expression\Function.php:35)
  at Twig_Node_Expression_Function->compile(object(Twig_Compiler))
     (vendor\twig\twig\lib\Twig\Compiler.php:84)
  at Twig_Compiler->subcompile(object(Twig_Node_Expression_Function))
     (vendor\twig\twig\lib\Twig\Node\Expression\Call.php:87)
  at Twig_Node_Expression_Call->compileArguments(object(Twig_Compiler))
     (vendor\twig\twig\lib\Twig\Node\Expression\Call.php:47)
  at Twig_Node_Expression_Call->compileCallable(object(Twig_Compiler))
     (vendor\twig\twig\lib\Twig\Node\Expression\Filter.php:32)
  at Twig_Node_Expression_Filter->compile(object(Twig_Compiler))
     (vendor\twig\twig\lib\Twig\Compiler.php:84)
  at Twig_Compiler->subcompile(object(Twig_Node_Expression_Filter))
     (vendor\twig\twig\lib\Twig\Node\Print.php:30)
  at Twig_Node_Print->compile(object(Twig_Compiler))
     (vendor\twig\twig\lib\Twig\Node.php:82)
  at Twig_Node->compile(object(Twig_Compiler))
     (vendor\twig\twig\lib\Twig\Node.php:82)
  at Twig_Node->compile(object(Twig_Compiler))
     (vendor\twig\twig\lib\Twig\Compiler.php:84)
  at Twig_Compiler->subcompile(object(Twig_Node_Body))
     (vendor\twig\twig\lib\Twig\Node\Module.php:303)
  at Twig_Node_Module->compileDisplay(object(Twig_Compiler))
     (vendor\twig\twig\lib\Twig\Node\Module.php:87)
  at Twig_Node_Module->compileTemplate(object(Twig_Compiler))
     (vendor\twig\twig\lib\Twig\Node\Module.php:68)
  at Twig_Node_Module->compile(object(Twig_Compiler))
     (vendor\twig\twig\lib\Twig\Compiler.php:73)
  at Twig_Compiler->compile(object(Twig_Node_Module))
     (vendor\twig\twig\lib\Twig\Environment.php:552)
  at Twig_Environment->compile(object(Twig_Node_Module))
     (vendor\twig\twig\lib\Twig\Environment.php:565)
  at Twig_Environment->compileSource(object(Twig_Source))
     (vendor\twig\twig\lib\Twig\Environment.php:368)
  at Twig_Environment->loadTemplate('COTerminalBundle:Layout:default.html.twig', null)
     (vendor\twig\twig\lib\Twig\Template.php:330)
  at Twig_Template->loadTemplate('COTerminalBundle:Layout:default.html.twig', 'COTerminalBundle:Summary:index.html.twig', 1)
     (var\cache\dev\twig\97\978d5147bd01293cb764603fc7cd00b1c51d7a1412daae1c1f3c3d008dc092ac.php:15)
  at __TwigTemplate_fc502452fd2cc771596800db9a055ed5aabb58f726f1c6aa2d28ccc6e1d17e2b->__construct(object(Twig_Environment))
     (vendor\twig\twig\lib\Twig\Environment.php:397)
  at Twig_Environment->loadTemplate('COTerminalBundle:Summary:index.html.twig')
     (vendor\symfony\symfony\src\Symfony\Bridge\Twig\TwigEngine.php:125)
  at Symfony\Bridge\Twig\TwigEngine->load('COTerminalBundle:Summary:index.html.twig')
     (vendor\symfony\symfony\src\Symfony\Bridge\Twig\TwigEngine.php:49)
  at Symfony\Bridge\Twig\TwigEngine->render('COTerminalBundle:Summary:index.html.twig', array('quotes' => object(SlidingPagination), 'form' => object(FormView), 'fromDateFormatted' => null, 'toDateFormatted' => null, 'quoteLinksEnabled' => true, 'takeoffLinksEnabled' => true))
     (vendor\symfony\symfony\src\Symfony\Bundle\TwigBundle\TwigEngine.php:45)
  at Symfony\Bundle\TwigBundle\TwigEngine->render('COTerminalBundle:Summary:index.html.twig', array('quotes' => object(SlidingPagination), 'form' => object(FormView), 'fromDateFormatted' => null, 'toDateFormatted' => null, 'quoteLinksEnabled' => true, 'takeoffLinksEnabled' => true))
     (vendor\symfony\symfony\src\Symfony\Bundle\FrameworkBundle\Controller\ControllerTrait.php:284)
  at Symfony\Bundle\FrameworkBundle\Controller\Controller->render('COTerminalBundle:Summary:index.html.twig', array('quotes' => object(SlidingPagination), 'form' => object(FormView), 'fromDateFormatted' => null, 'toDateFormatted' => null, 'quoteLinksEnabled' => true, 'takeoffLinksEnabled' => true))
     (src\CO\TerminalBundle\Controller\SummaryController.php:73)
  at CO\TerminalBundle\Controller\SummaryController->indexAction(object(Request))
     (vendor\symfony\symfony\src\Symfony\Component\HttpKernel\HttpKernel.php:151)
  at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), 1)
     (vendor\symfony\symfony\src\Symfony\Component\HttpKernel\HttpKernel.php:68)
  at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, true)
     (vendor\symfony\symfony\src\Symfony\Component\HttpKernel\Kernel.php:200)
  at Symfony\Component\HttpKernel\Kernel->handle(object(Request))
     (public\app_dev.php:24)
  at require('C:\\xampp\\htdocs\\terminal\\public\\app_dev.php')
     (vendor\symfony\symfony\src\Symfony\Bundle\WebServerBundle\Resources\router.php:42)

0 个答案:

没有答案