'Invalid header value type; must be a string or numeric; received %s',
(is_object($value) ? get_class($value) : gettype($value))
));
}
if (! self::isValid($value)) {
throw new Exception\InvalidArgumentException(sprintf(
'"%s" is not valid header value',
$value
));
}
}
. 'cannot be an empty array'
);
}
return array_map(function ($value) {
HeaderSecurity::assertValid($value);
return (string) $value;
}, array_values($values));
}
return array_map(function ($value) {
HeaderSecurity::assertValid($value);
return (string) $value;
}, array_values($values));
}
/**
* Ensure header name and values are valid.
*
}
$header = $this->headerNames[strtolower($header)];
$new = clone $this;
$value = $this->filterHeaderValue($value);
$new->headers[$header] = array_merge($this->headers[$header], $value);
return $new;
}
/**
if ($replace && $response->hasHeader($name)) {
$response = $response->withoutHeader($name);
}
// Add the header to the internal array.
$this->setResponse($response->withAddedHeader($name, $value));
return $this;
}
/**
if ($errorReporting === "development" || $errorReporting === "maximum") {
$status .= ' ' . str_replace("\n", ' ', $this->_error->getMessage());
}
CmsFactory::getApplication()->setHeader('status', $status);
// Set variables
$this->debug = $params['debug'] ?? false;
$this->error = $this->_error;
'template' => $template->template,
'directory' => JPATH_THEMES,
'debug' => JDEBUG,
'csp_nonce' => $app->get('csp_nonce'),
'templateInherits' => $template->parent,
'params' => $template->params,
]
);
}
}
// Reset the document object in the factory, this gives us a clean slate and lets everything render properly
Factory::$document = $renderer->getDocument();
Factory::getApplication()->loadDocument(Factory::$document);
$data = $renderer->render($error);
// If nothing was rendered, just use the message from the Exception
if (empty($data)) {
$data = $error->getMessage();
}
* @since 3.10.0
*/
public static function handleException(\Throwable $error)
{
static::logException($error);
static::render($error);
}
/**
* Render the error page based on an exception.
*
);
// Trigger the onError event.
$this->triggerEvent('onError', $event);
ExceptionHandler::handleException($event->getError());
}
// Trigger the onBeforeRespond event.
$this->getDispatcher()->dispatch('onBeforeRespond');
// Set the application as global app
\Joomla\CMS\Factory::$application = $app;
// Execute the application.
$app->execute();
* define() is used rather than "const" to not error for PHP 5.2 and lower
*/
define('_JEXEC', 1);
// Run the application - All executable code should be triggered through this file
require_once dirname(__FILE__) . '/includes/app.php';
'Invalid header value type; must be a string or numeric; received %s',
(is_object($value) ? get_class($value) : gettype($value))
));
}
if (! self::isValid($value)) {
throw new Exception\InvalidArgumentException(sprintf(
'"%s" is not valid header value',
$value
));
}
}
. 'cannot be an empty array'
);
}
return array_map(function ($value) {
HeaderSecurity::assertValid($value);
return (string) $value;
}, array_values($values));
}
return array_map(function ($value) {
HeaderSecurity::assertValid($value);
return (string) $value;
}, array_values($values));
}
/**
* Ensure header name and values are valid.
*
$new = clone $this;
if ($new->hasHeader($header)) {
unset($new->headers[$new->headerNames[$normalized]]);
}
$value = $this->filterHeaderValue($value);
$new->headerNames[$normalized] = $header;
$new->headers[$header] = $value;
return $new;
public function withAddedHeader($header, $value) : MessageInterface
{
$this->assertHeader($header);
if (! $this->hasHeader($header)) {
return $this->withHeader($header, $value);
}
$header = $this->headerNames[strtolower($header)];
$new = clone $this;
if ($replace && $response->hasHeader($name)) {
$response = $response->withoutHeader($name);
}
// Add the header to the internal array.
$this->setResponse($response->withAddedHeader($name, $value));
return $this;
}
/**
throw new \InvalidArgumentException('You have not supplied a valid HTTP status code');
}
// All other cases use the more efficient HTTP header for redirection.
$this->setHeader('Status', (string) $status, true);
$this->setHeader('Location', $url, true);
}
$this->dispatchEvent(ApplicationEvents::BEFORE_RESPOND);
// Set appropriate headers
if (\count($this->messageQueue)) {
$this->getSession()->set('application.queue', $this->messageQueue);
}
// Hand over processing to the parent now
parent::redirect($url, $status);
}
/**
* Rendering is the process of pushing the document buffers into the template
* placeholders, retrieving data from the document and pushing it into
$this->getApplication()->setHeader('Cache-Control', 'no-store, no-cache, must-revalidate', false);
$this->getApplication()->sendHeaders();
}
// Redirect to language.
$this->getApplication()->redirect($redirectUri, $redirectHttpCode);
}
// We have found our language and now need to set the cookie and the language value in our system
$this->current_lang = $lang_code;
if (!\array_key_exists('parse' . $stage, $this->rules)) {
throw new \InvalidArgumentException(sprintf('The %s stage is not registered. (%s)', $stage, __METHOD__));
}
foreach ($this->rules['parse' . $stage] as $rule) {
$rule($this, $uri);
}
}
/**
* Process the build uri query data based on custom defined rules
* @throws \Exception
*/
public function parse(&$uri, $setVars = false)
{
// Do the preprocess stage of the URL parse process
$this->processParseRules($uri, self::PROCESS_BEFORE);
// Do the main stage of the URL parse process
$this->processParseRules($uri);
// Do the postprocess stage of the URL parse process
// Get the full request URI.
$uri = clone Uri::getInstance();
// It is not possible to inject the SiteRouter as it requires a SiteApplication
// and we would end in an infinite loop
$result = $this->getContainer()->get(SiteRouter::class)->parse($uri, true);
$active = $this->getMenu()->getActive();
if (
$active !== null
// Mark afterInitialise in the profiler.
JDEBUG ? $this->profiler->mark('afterInitialise') : null;
// Route the application
$this->route();
// Mark afterRoute in the profiler.
JDEBUG ? $this->profiler->mark('afterRoute') : null;
if (!$this->isHandlingMultiFactorAuthentication()) {
$this->sanityCheckSystemVariables();
$this->setupLogging();
$this->createExtensionNamespaceMap();
// Perform application routines.
$this->doExecute();
// If we have an application document object, render it.
if ($this->document instanceof \Joomla\CMS\Document\Document) {
// Render the application output.
$this->render();
// Set the application as global app
\Joomla\CMS\Factory::$application = $app;
// Execute the application.
$app->execute();
* define() is used rather than "const" to not error for PHP 5.2 and lower
*/
define('_JEXEC', 1);
// Run the application - All executable code should be triggered through this file
require_once dirname(__FILE__) . '/includes/app.php';
[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) |