Closed
Description
Just updated one of my projects from Symfony2.7 to 2.8 and now am getting the following error multiple times inside UnusedTagsPass
. What ever there is wrong configurated by a bundle or so (sry, not checked in detail), should not run into this condition. UnusedTagsPass
is just a logger which should catch this issue.
EDIT
Found following usage. Should we protect this?
<tag channel="foo"/>
ContextErrorException in UnusedTagsPass.php line 73: Warning: strpos(): Empty needle
Simple workaround. :)
foreach ($container->findUnusedTags() as $tag) {
// skip whitelisted tags
if (!$tag || in_array($tag, $this->whitelist)) {
in UnusedTagsPass.php line 73
at ErrorHandler->handleError('2', 'strpos(): Empty needle', '/.../src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/UnusedTagsPass.php', '73', array('container' => object(ContainerBuilder), 'compiler' => object(Compiler), 'formatter' => object(LoggingFormatter), 'tags' => array('twig.loader', 'monolog.logger', 'console.command', 'kernel.event_subscriber', 'data_collector', 'knp_menu.renderer', 'knp_menu.voter', 'kernel.event_listener', 'twig.extension', 'knp_paginator.subscriber', 'fos_elastica.index', 'knp_menu.menu', 'form.type', ....'serializer.normalizer'), 'tag' => '', 'candidates' => array(), 'definedTag' => 'twig.loader', 'this' => object(UnusedTagsPass)))
at strpos('twig.loader', '') in UnusedTagsPass.php line 73
at UnusedTagsPass->process(object(ContainerBuilder)) in Compiler.php line 107
at Compiler->compile(object(ContainerBuilder)) in ContainerBuilder.php line 589
at ContainerBuilder->compile() in Kernel.php line 511
at Kernel->initializeContainer() in Kernel.php line 133
at Kernel->boot() in Kernel.php line 182
at Kernel->handle(object(Request)) in app_dev.php line 31