Symfony Exception

ParseError

HTTP 500 Internal Server Error

syntax error, unexpected variable "$likeCondition", expecting "function" or "const"

Exception

ParseError

  1.             // Wenn keine Objektbedingungen vorhanden sind, beschränke die Suche auf Dokumente
  2.             $combinedConditions .= " AND $documentCondition";
  3.         }*/
  4.         $likeCondition '( `data` LIKE ' $db->quote('%' $query '%') . ' )';
  5.         if (!preg_match('/[+\-*"]/'$query)) {
  6.             // check for a boolean operator (which was not filtered by filterQueryParam()),
  7.             // if present, do not add asterisk at the end of the query
in /html/pimcore/vendor/composer/ClassLoader.php Composer\Autoload\includeFile (line 428)
  1.      * @return true|null True if loaded, null otherwise
  2.      */
  3.     public function loadClass($class)
  4.     {
  5.         if ($file $this->findFile($class)) {
  6.             includeFile($file);
  7.             return true;
  8.         }
  9.         return null;
  1.                     return;
  2.                 } elseif (false === include $file) {
  3.                     return;
  4.                 }
  5.             } else {
  6.                 ($this->classLoader)($class);
  7.                 $file '';
  8.             }
  9.         } finally {
  10.             error_reporting($e);
  11.         }
DebugClassLoader->loadClass('App\\Service\\CustomSearchService')
  1.             }
  2.             $autoloadedClass self::$autoloadedClass;
  3.             self::$autoloadedClass ltrim($this->resource'\\');
  4.             try {
  5.                 $exists[0] = class_exists($this->resource) || interface_exists($this->resourcefalse) || trait_exists($this->resourcefalse);
  6.             } catch (\Exception $e) {
  7.                 $exists[1] = $e->getMessage();
  8.                 try {
  9.                     self::throwOnRequiredClass($this->resource$e);
  1.         try {
  2.             if (isset($this->classReflectors[$class])) {
  3.                 $classReflector $this->classReflectors[$class];
  4.             } elseif (class_exists(ClassExistenceResource::class)) {
  5.                 $resource = new ClassExistenceResource($classfalse);
  6.                 $classReflector $resource->isFresh(0) ? false : new \ReflectionClass($class);
  7.             } else {
  8.                 $classReflector class_exists($class) ? new \ReflectionClass($class) : false;
  9.             }
  10.         } catch (\ReflectionException $e) {
  11.             if ($throw) {
  1.         if (80000 \PHP_VERSION_ID) {
  2.             return;
  3.         }
  4.         foreach ($container->getDefinitions() as $id => $definition) {
  5.             if ($this->accept($definition) && $class $container->getReflectionClass($definition->getClass(), false)) {
  6.                 $this->processClass($container$class);
  7.             }
  8.         }
  9.     }
  1.      */
  2.     public function compile(ContainerBuilder $container)
  3.     {
  4.         try {
  5.             foreach ($this->passConfig->getPasses() as $pass) {
  6.                 $pass->process($container);
  7.             }
  8.         } catch (\Exception $e) {
  9.             $usedEnvs = [];
  10.             $prev $e;
  1.         if ($resolveEnvPlaceholders && $bag instanceof EnvPlaceholderParameterBag) {
  2.             $compiler->addPass(new ResolveEnvPlaceholdersPass(), PassConfig::TYPE_AFTER_REMOVING, -1000);
  3.         }
  4.         $compiler->compile($this);
  5.         foreach ($this->definitions as $id => $definition) {
  6.             if ($this->trackResources && $definition->isLazy()) {
  7.                 $this->getReflectionClass($definition->getClass());
  8.             }
  1.         }
  2.         try {
  3.             $container null;
  4.             $container $this->buildContainer();
  5.             $container->compile();
  6.         } finally {
  7.             if ($collectDeprecations) {
  8.                 restore_error_handler();
  9.                 @file_put_contents($buildDir.'/'.$class.'Deprecations.log'serialize(array_values($collectedLogs)));
in /html/pimcore/vendor/pimcore/pimcore/lib/Kernel.php -> initializeContainer (line 305)
  1.     /**
  2.      * {@inheritdoc}
  3.      */
  4.     protected function initializeContainer()
  5.     {
  6.         parent::initializeContainer();
  7.         // initialize runtime cache (defined as synthetic service)
  8.         RuntimeCache::getInstance();
  9.         // set the extension config on the container
in /html/pimcore/vendor/symfony/http-kernel/Kernel.php -> initializeContainer (line 787)
  1.             $_ENV['SHELL_VERBOSITY'] = 3;
  2.             $_SERVER['SHELL_VERBOSITY'] = 3;
  3.         }
  4.         $this->initializeBundles();
  5.         $this->initializeContainer();
  6.         $container $this->container;
  7.         if ($container->hasParameter('kernel.trusted_hosts') && $trustedHosts $container->getParameter('kernel.trusted_hosts')) {
  8.             Request::setTrustedHosts($trustedHosts);
  1.             return;
  2.         }
  3.         if (null === $this->container) {
  4.             $this->preBoot();
  5.         }
  6.         foreach ($this->getBundles() as $bundle) {
  7.             $bundle->setContainer($this->container);
  8.             $bundle->boot();
  1.         $this->setSystemRequirements();
  2.         // initialize extension manager config
  3.         $this->extensionConfig = new Extension\Config();
  4.         parent::boot();
  5.     }
  6.     /**
  7.      * {@inheritdoc}
  8.      */
  1.             throw new \InvalidArgumentException(sprintf('Defined Kernel Class %s needs to extend the \Pimcore\Kernel Class'$kernelClass));
  2.         }
  3.         $kernel = new $kernelClass($environment$debug);
  4.         \Pimcore::setKernel($kernel);
  5.         $kernel->boot();
  6.         $conf \Pimcore::getContainer()->getParameter('pimcore.config');
  7.         if ($conf['general']['timezone']) {
  8.             date_default_timezone_set($conf['general']['timezone']);
Bootstrap::kernel() in /html/pimcore/public/index.php (line 31)
  1. // set current request as property on tool as there's no
  2. // request stack available yet
  3. Tool::setCurrentRequest($request);
  4. /** @var \Pimcore\Kernel $kernel */
  5. $kernel \Pimcore\Bootstrap::kernel();
  6. // reset current request - will be read from request stack from now on
  7. Tool::setCurrentRequest(null);
  8. $response $kernel->handle($request);

Stack Trace

ParseError
ParseError:
syntax error, unexpected variable "$likeCondition", expecting "function" or "const"

  at /html/pimcore/src/Service/CustomSearchService.php:101
  at Composer\Autoload\includeFile('/html/pimcore/vendor/composer/../../src/Service/CustomSearchService.php')
     (/html/pimcore/vendor/composer/ClassLoader.php:428)
  at Composer\Autoload\ClassLoader->loadClass('App\\Service\\CustomSearchService')
     (/html/pimcore/vendor/symfony/error-handler/DebugClassLoader.php:294)
  at Symfony\Component\ErrorHandler\DebugClassLoader->loadClass('App\\Service\\CustomSearchService')
  at class_exists('App\\Service\\CustomSearchService')
     (/html/pimcore/vendor/symfony/config/Resource/ClassExistenceResource.php:78)
  at Symfony\Component\Config\Resource\ClassExistenceResource->isFresh(0)
     (/html/pimcore/vendor/symfony/dependency-injection/ContainerBuilder.php:370)
  at Symfony\Component\DependencyInjection\ContainerBuilder->getReflectionClass('App\\Service\\CustomSearchService', false)
     (/html/pimcore/vendor/symfony/dependency-injection/Compiler/RegisterAutoconfigureAttributesPass.php:39)
  at Symfony\Component\DependencyInjection\Compiler\RegisterAutoconfigureAttributesPass->process(object(ContainerBuilder))
     (/html/pimcore/vendor/symfony/dependency-injection/Compiler/Compiler.php:82)
  at Symfony\Component\DependencyInjection\Compiler\Compiler->compile(object(ContainerBuilder))
     (/html/pimcore/vendor/symfony/dependency-injection/ContainerBuilder.php:757)
  at Symfony\Component\DependencyInjection\ContainerBuilder->compile()
     (/html/pimcore/vendor/symfony/http-kernel/Kernel.php:546)
  at Symfony\Component\HttpKernel\Kernel->initializeContainer()
     (/html/pimcore/vendor/pimcore/pimcore/lib/Kernel.php:305)
  at Pimcore\Kernel->initializeContainer()
     (/html/pimcore/vendor/symfony/http-kernel/Kernel.php:787)
  at Symfony\Component\HttpKernel\Kernel->preBoot()
     (/html/pimcore/vendor/symfony/http-kernel/Kernel.php:128)
  at Symfony\Component\HttpKernel\Kernel->boot()
     (/html/pimcore/vendor/pimcore/pimcore/lib/Kernel.php:284)
  at Pimcore\Kernel->boot()
     (/html/pimcore/vendor/pimcore/pimcore/lib/Bootstrap.php:262)
  at Pimcore\Bootstrap::kernel()
     (/html/pimcore/public/index.php:31)