InvalidArgumentException InvalidArgumentException

HTTP 500 Whoops, looks like something went wrong.

"500 "https://www.baroniet.se/sv/vatten-och-viltvaard/vatten-och-viltvaard.html" is not valid header value" is not valid header value

Exceptions 2

Laminas\Diactoros\Exception\ InvalidArgumentException

  1.                 'Invalid header value type; must be a string or numeric; received %s',
  2.                 (is_object($value) ? get_class($value) : gettype($value))
  3.             ));
  4.         }
  5.         if (! self::isValid($value)) {
  6.             throw new Exception\InvalidArgumentException(sprintf(
  7.                 '"%s" is not valid header value',
  8.                 $value
  9.             ));
  10.         }
  11.     }
  1.                 'cannot be an empty array'
  2.             );
  3.         }
  4.         return array_map(function ($value) {
  5.             HeaderSecurity::assertValid($value);
  6.             return (string) $value;
  7.         }, array_values($values));
  8.     }
Response->Laminas\Diactoros\{closure}('500 "https://www.baroniet.se/sv/vatten-och-viltvaard/vatten-och-viltvaard.html" is not valid header value')
  1.         return array_map(function ($value) {
  2.             HeaderSecurity::assertValid($value);
  3.             return (string) $value;
  4.         }, array_values($values));
  5.     }
  6.     /**
  7.      * Ensure header name and values are valid.
  8.      *
  1.         }
  2.         $header $this->headerNames[strtolower($header)];
  3.         $new = clone $this;
  4.         $value $this->filterHeaderValue($value);
  5.         $new->headers[$header] = array_merge($this->headers[$header], $value);
  6.         return $new;
  7.     }
  8.     /**
  1.         if ($replace && $response->hasHeader($name)) {
  2.             $response $response->withoutHeader($name);
  3.         }
  4.         // Add the header to the internal array.
  5.         $this->setResponse($response->withAddedHeader($name$value));
  6.         return $this;
  7.     }
  8.     /**
AbstractWebApplication->setHeader('status', '500 "https://www.baroniet.se/sv/vatten-och-viltvaard/vatten-och-viltvaard.html" is not valid header value') in /home/u/u5780387/www/libraries/src/Document/ErrorDocument.php (line 131)
  1.         if ($errorReporting === "development" || $errorReporting === "maximum") {
  2.             $status .= ' ' str_replace("\n"' '$this->_error->getMessage());
  3.         }
  4.         CmsFactory::getApplication()->setHeader('status'$status);
  5.         // Set variables
  6.         $this->debug $params['debug'] ?? false;
  7.         $this->error $this->_error;
ErrorDocument->render(false, array('template' => 'yootheme', 'directory' => '/home/u/u5780387/www/templates', 'debug' => false, 'csp_nonce' => null, 'templateInherits' => '', 'params' => object(Registry))) in /home/u/u5780387/www/libraries/src/Error/Renderer/HtmlRenderer.php (line 78)
  1.                 'template'         => $template->template,
  2.                 'directory'        => JPATH_THEMES,
  3.                 'debug'            => JDEBUG,
  4.                 'csp_nonce'        => $app->get('csp_nonce'),
  5.                 'templateInherits' => $template->parent,
  6.                 'params'           => $template->params,
  7.             ]
  8.         );
  9.     }
  10. }
HtmlRenderer->render(object(InvalidArgumentException)) in /home/u/u5780387/www/libraries/src/Exception/ExceptionHandler.php (line 126)
  1.             // Reset the document object in the factory, this gives us a clean slate and lets everything render properly
  2.             Factory::$document $renderer->getDocument();
  3.             Factory::getApplication()->loadDocument(Factory::$document);
  4.             $data $renderer->render($error);
  5.             // If nothing was rendered, just use the message from the Exception
  6.             if (empty($data)) {
  7.                 $data $error->getMessage();
  8.             }
ExceptionHandler::render(object(InvalidArgumentException)) in /home/u/u5780387/www/libraries/src/Exception/ExceptionHandler.php (line 72)
  1.      * @since   3.10.0
  2.      */
  3.     public static function handleException(\Throwable $error)
  4.     {
  5.         static::logException($error);
  6.         static::render($error);
  7.     }
  8.     /**
  9.      * Render the error page based on an exception.
  10.      *
ExceptionHandler::handleException(object(InvalidArgumentException)) in /home/u/u5780387/www/libraries/src/Application/CMSApplication.php (line 322)
  1.             );
  2.             // Trigger the onError event.
  3.             $this->triggerEvent('onError'$event);
  4.             ExceptionHandler::handleException($event->getError());
  5.         }
  6.         // Trigger the onBeforeRespond event.
  7.         $this->getDispatcher()->dispatch('onBeforeRespond');
CMSApplication->execute() in /home/u/u5780387/www/includes/app.php (line 61)
  1. // Set the application as global app
  2. \Joomla\CMS\Factory::$application $app;
  3. // Execute the application.
  4. $app->execute();
require_once('/home/u/u5780387/www/includes/app.php') in /home/u/u5780387/www/index.php (line 32)
  1.  * define() is used rather than "const" to not error for PHP 5.2 and lower
  2.  */
  3. define('_JEXEC'1);
  4. // Run the application - All executable code should be triggered through this file
  5. require_once dirname(__FILE__) . '/includes/app.php';

Laminas\Diactoros\Exception\ InvalidArgumentException

"https://www.baroniet.se/sv/vatten-och-viltvaard/vatten-och-viltvaard.html" is not valid header value

  1.                 'Invalid header value type; must be a string or numeric; received %s',
  2.                 (is_object($value) ? get_class($value) : gettype($value))
  3.             ));
  4.         }
  5.         if (! self::isValid($value)) {
  6.             throw new Exception\InvalidArgumentException(sprintf(
  7.                 '"%s" is not valid header value',
  8.                 $value
  9.             ));
  10.         }
  11.     }
  1.                 'cannot be an empty array'
  2.             );
  3.         }
  4.         return array_map(function ($value) {
  5.             HeaderSecurity::assertValid($value);
  6.             return (string) $value;
  7.         }, array_values($values));
  8.     }
Response->Laminas\Diactoros\{closure}('https://www.baroniet.se/sv/vatten-och-viltvaard/vatten-och-viltvaard.html')
  1.         return array_map(function ($value) {
  2.             HeaderSecurity::assertValid($value);
  3.             return (string) $value;
  4.         }, array_values($values));
  5.     }
  6.     /**
  7.      * Ensure header name and values are valid.
  8.      *
  1.         $new = clone $this;
  2.         if ($new->hasHeader($header)) {
  3.             unset($new->headers[$new->headerNames[$normalized]]);
  4.         }
  5.         $value $this->filterHeaderValue($value);
  6.         $new->headerNames[$normalized] = $header;
  7.         $new->headers[$header]         = $value;
  8.         return $new;
  1.     public function withAddedHeader($header$value) : MessageInterface
  2.     {
  3.         $this->assertHeader($header);
  4.         if (! $this->hasHeader($header)) {
  5.             return $this->withHeader($header$value);
  6.         }
  7.         $header $this->headerNames[strtolower($header)];
  8.         $new = clone $this;
  1.         if ($replace && $response->hasHeader($name)) {
  2.             $response $response->withoutHeader($name);
  3.         }
  4.         // Add the header to the internal array.
  5.         $this->setResponse($response->withAddedHeader($name$value));
  6.         return $this;
  7.     }
  8.     /**
  1.                 throw new \InvalidArgumentException('You have not supplied a valid HTTP status code');
  2.             }
  3.             // All other cases use the more efficient HTTP header for redirection.
  4.             $this->setHeader('Status', (string) $statustrue);
  5.             $this->setHeader('Location'$urltrue);
  6.         }
  7.         $this->dispatchEvent(ApplicationEvents::BEFORE_RESPOND);
  8.         // Set appropriate headers
AbstractWebApplication->redirect('https://www.baroniet.se/sv/vatten-och-viltvaard/vatten-och-viltvaard.html', 301) in /home/u/u5780387/www/libraries/src/Application/CMSApplication.php (line 983)
  1.         if (\count($this->messageQueue)) {
  2.             $this->getSession()->set('application.queue'$this->messageQueue);
  3.         }
  4.         // Hand over processing to the parent now
  5.         parent::redirect($url$status);
  6.     }
  7.     /**
  8.      * Rendering is the process of pushing the document buffers into the template
  9.      * placeholders, retrieving data from the document and pushing it into
CMSApplication->redirect('https://www.baroniet.se/sv/vatten-och-viltvaard/vatten-och-viltvaard.html', 301) in /home/u/u5780387/www/plugins/system/languagefilter/src/Extension/LanguageFilter.php (line 460)
  1.                 $this->getApplication()->setHeader('Cache-Control''no-store, no-cache, must-revalidate'false);
  2.                 $this->getApplication()->sendHeaders();
  3.             }
  4.             // Redirect to language.
  5.             $this->getApplication()->redirect($redirectUri$redirectHttpCode);
  6.         }
  7.         // We have found our language and now need to set the cookie and the language value in our system
  8.         $this->current_lang $lang_code;
LanguageFilter->parseRule(object(SiteRouter), object(Uri)) in /home/u/u5780387/www/libraries/src/Router/Router.php (line 384)
  1.         if (!\array_key_exists('parse' $stage$this->rules)) {
  2.             throw new \InvalidArgumentException(sprintf('The %s stage is not registered. (%s)'$stage__METHOD__));
  3.         }
  4.         foreach ($this->rules['parse' $stage] as $rule) {
  5.             $rule($this$uri);
  6.         }
  7.     }
  8.     /**
  9.      * Process the build uri query data based on custom defined rules
Router->processParseRules(object(Uri), 'preprocess') in /home/u/u5780387/www/libraries/src/Router/Router.php (line 144)
  1.      * @throws  \Exception
  2.      */
  3.     public function parse(&$uri$setVars false)
  4.     {
  5.         // Do the preprocess stage of the URL parse process
  6.         $this->processParseRules($uriself::PROCESS_BEFORE);
  7.         // Do the main stage of the URL parse process
  8.         $this->processParseRules($uri);
  9.         // Do the postprocess stage of the URL parse process
Router->parse(object(Uri), true) in /home/u/u5780387/www/libraries/src/Application/SiteApplication.php (line 746)
  1.         // Get the full request URI.
  2.         $uri = clone Uri::getInstance();
  3.         // It is not possible to inject the SiteRouter as it requires a SiteApplication
  4.         // and we would end in an infinite loop
  5.         $result $this->getContainer()->get(SiteRouter::class)->parse($uritrue);
  6.         $active $this->getMenu()->getActive();
  7.         if (
  8.             $active !== null
  1.         // Mark afterInitialise in the profiler.
  2.         JDEBUG $this->profiler->mark('afterInitialise') : null;
  3.         // Route the application
  4.         $this->route();
  5.         // Mark afterRoute in the profiler.
  6.         JDEBUG $this->profiler->mark('afterRoute') : null;
  7.         if (!$this->isHandlingMultiFactorAuthentication()) {
  1.             $this->sanityCheckSystemVariables();
  2.             $this->setupLogging();
  3.             $this->createExtensionNamespaceMap();
  4.             // Perform application routines.
  5.             $this->doExecute();
  6.             // If we have an application document object, render it.
  7.             if ($this->document instanceof \Joomla\CMS\Document\Document) {
  8.                 // Render the application output.
  9.                 $this->render();
CMSApplication->execute() in /home/u/u5780387/www/includes/app.php (line 61)
  1. // Set the application as global app
  2. \Joomla\CMS\Factory::$application $app;
  3. // Execute the application.
  4. $app->execute();
require_once('/home/u/u5780387/www/includes/app.php') in /home/u/u5780387/www/index.php (line 32)
  1.  * define() is used rather than "const" to not error for PHP 5.2 and lower
  2.  */
  3. define('_JEXEC'1);
  4. // Run the application - All executable code should be triggered through this file
  5. require_once dirname(__FILE__) . '/includes/app.php';

Stack Traces 2

[2/2] InvalidArgumentException
Laminas\Diactoros\Exception\InvalidArgumentException:
"500 "https://www.baroniet.se/sv/vatten-och-viltvaard/vatten-och-viltvaard.html" is not valid header value" is not valid header value

  at /home/u/u5780387/www/libraries/vendor/laminas/laminas-diactoros/src/HeaderSecurity.php:146
  at Laminas\Diactoros\HeaderSecurity::assertValid('500 "https://www.baroniet.se/sv/vatten-och-viltvaard/vatten-och-viltvaard.html" is not valid header value')
     (/home/u/u5780387/www/libraries/vendor/laminas/laminas-diactoros/src/MessageTrait.php:399)
  at Laminas\Diactoros\Response->Laminas\Diactoros\{closure}('500 "https://www.baroniet.se/sv/vatten-och-viltvaard/vatten-och-viltvaard.html" is not valid header value')
  at array_map(object(Closure), array('500 "https://www.baroniet.se/sv/vatten-och-viltvaard/vatten-och-viltvaard.html" is not valid header value'))
     (/home/u/u5780387/www/libraries/vendor/laminas/laminas-diactoros/src/MessageTrait.php:402)
  at Laminas\Diactoros\Response->filterHeaderValue(array('500 "https://www.baroniet.se/sv/vatten-och-viltvaard/vatten-och-viltvaard.html" is not valid header value'))
     (/home/u/u5780387/www/libraries/vendor/laminas/laminas-diactoros/src/MessageTrait.php:249)
  at Laminas\Diactoros\Response->withAddedHeader('Status', '500 "https://www.baroniet.se/sv/vatten-och-viltvaard/vatten-och-viltvaard.html" is not valid header value')
     (/home/u/u5780387/www/libraries/vendor/joomla/application/src/AbstractWebApplication.php:563)
  at Joomla\Application\AbstractWebApplication->setHeader('status', '500 "https://www.baroniet.se/sv/vatten-och-viltvaard/vatten-och-viltvaard.html" is not valid header value')
     (/home/u/u5780387/www/libraries/src/Document/ErrorDocument.php:131)
  at Joomla\CMS\Document\ErrorDocument->render(false, array('template' => 'yootheme', 'directory' => '/home/u/u5780387/www/templates', 'debug' => false, 'csp_nonce' => null, 'templateInherits' => '', 'params' => object(Registry)))
     (/home/u/u5780387/www/libraries/src/Error/Renderer/HtmlRenderer.php:78)
  at Joomla\CMS\Error\Renderer\HtmlRenderer->render(object(InvalidArgumentException))
     (/home/u/u5780387/www/libraries/src/Exception/ExceptionHandler.php:126)
  at Joomla\CMS\Exception\ExceptionHandler::render(object(InvalidArgumentException))
     (/home/u/u5780387/www/libraries/src/Exception/ExceptionHandler.php:72)
  at Joomla\CMS\Exception\ExceptionHandler::handleException(object(InvalidArgumentException))
     (/home/u/u5780387/www/libraries/src/Application/CMSApplication.php:322)
  at Joomla\CMS\Application\CMSApplication->execute()
     (/home/u/u5780387/www/includes/app.php:61)
  at require_once('/home/u/u5780387/www/includes/app.php')
     (/home/u/u5780387/www/index.php:32)                
[1/2] InvalidArgumentException
Laminas\Diactoros\Exception\InvalidArgumentException:
"https://www.baroniet.se/sv/vatten-och-viltvaard/vatten-och-viltvaard.html" is not valid header value

  at /home/u/u5780387/www/libraries/vendor/laminas/laminas-diactoros/src/HeaderSecurity.php:146
  at Laminas\Diactoros\HeaderSecurity::assertValid('https://www.baroniet.se/sv/vatten-och-viltvaard/vatten-och-viltvaard.html')
     (/home/u/u5780387/www/libraries/vendor/laminas/laminas-diactoros/src/MessageTrait.php:399)
  at Laminas\Diactoros\Response->Laminas\Diactoros\{closure}('https://www.baroniet.se/sv/vatten-och-viltvaard/vatten-och-viltvaard.html')
  at array_map(object(Closure), array('https://www.baroniet.se/sv/vatten-och-viltvaard/vatten-och-viltvaard.html'))
     (/home/u/u5780387/www/libraries/vendor/laminas/laminas-diactoros/src/MessageTrait.php:402)
  at Laminas\Diactoros\Response->filterHeaderValue(array('https://www.baroniet.se/sv/vatten-och-viltvaard/vatten-och-viltvaard.html'))
     (/home/u/u5780387/www/libraries/vendor/laminas/laminas-diactoros/src/MessageTrait.php:213)
  at Laminas\Diactoros\Response->withHeader('Location', 'https://www.baroniet.se/sv/vatten-och-viltvaard/vatten-och-viltvaard.html')
     (/home/u/u5780387/www/libraries/vendor/laminas/laminas-diactoros/src/MessageTrait.php:243)
  at Laminas\Diactoros\Response->withAddedHeader('Location', 'https://www.baroniet.se/sv/vatten-och-viltvaard/vatten-och-viltvaard.html')
     (/home/u/u5780387/www/libraries/vendor/joomla/application/src/AbstractWebApplication.php:563)
  at Joomla\Application\AbstractWebApplication->setHeader('Location', 'https://www.baroniet.se/sv/vatten-och-viltvaard/vatten-och-viltvaard.html', true)
     (/home/u/u5780387/www/libraries/vendor/joomla/application/src/AbstractWebApplication.php:502)
  at Joomla\Application\AbstractWebApplication->redirect('https://www.baroniet.se/sv/vatten-och-viltvaard/vatten-och-viltvaard.html', 301)
     (/home/u/u5780387/www/libraries/src/Application/CMSApplication.php:983)
  at Joomla\CMS\Application\CMSApplication->redirect('https://www.baroniet.se/sv/vatten-och-viltvaard/vatten-och-viltvaard.html', 301)
     (/home/u/u5780387/www/plugins/system/languagefilter/src/Extension/LanguageFilter.php:460)
  at Joomla\Plugin\System\LanguageFilter\Extension\LanguageFilter->parseRule(object(SiteRouter), object(Uri))
     (/home/u/u5780387/www/libraries/src/Router/Router.php:384)
  at Joomla\CMS\Router\Router->processParseRules(object(Uri), 'preprocess')
     (/home/u/u5780387/www/libraries/src/Router/Router.php:144)
  at Joomla\CMS\Router\Router->parse(object(Uri), true)
     (/home/u/u5780387/www/libraries/src/Application/SiteApplication.php:746)
  at Joomla\CMS\Application\SiteApplication->route()
     (/home/u/u5780387/www/libraries/src/Application/SiteApplication.php:232)
  at Joomla\CMS\Application\SiteApplication->doExecute()
     (/home/u/u5780387/www/libraries/src/Application/CMSApplication.php:293)
  at Joomla\CMS\Application\CMSApplication->execute()
     (/home/u/u5780387/www/includes/app.php:61)
  at require_once('/home/u/u5780387/www/includes/app.php')
     (/home/u/u5780387/www/index.php:32)