'Invalid header value type; must be a string or numeric; received %s',
is_object($value) ? $value::class : 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(static function ($value): string {
HeaderSecurity::assertValid($value);
$value = (string) $value;
// Normalize line folding to a single space (RFC 7230#3.2.4).
$value = str_replace(["\r\n\t", "\r\n "], ' ', $value);
// Normalize line folding to a single space (RFC 7230#3.2.4).
$value = str_replace(["\r\n\t", "\r\n "], ' ', $value);
// Remove optional whitespace (OWS, RFC 7230#3.2.3) around the header value.
return trim($value, "\t ");
}, array_values($values));
}
/**
* Ensure header name and values are valid.
*
$new = clone $this;
if ($new->hasHeader($name)) {
unset($new->headers[$new->headerNames[$normalized]]);
}
$value = $this->filterHeaderValue($value);
$new->headerNames[$normalized] = $name;
$new->headers[$name] = $value;
return $new;
public function withAddedHeader($name, $value): MessageInterface
{
$this->assertHeader($name);
if (! $this->hasHeader($name)) {
return $this->withHeader($name, $value);
}
$header = $this->headerNames[strtolower($name)];
$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;
}
/**
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,
]
);
}
}
'subject' => $app,
'document' => $renderer->getDocument(),
])
);
$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->dispatchEvent('onError', $event);
ExceptionHandler::handleException($event->getError());
}
// Trigger the onBeforeRespond event.
$this->dispatchEvent(
'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';
// Check if a strip tags is required
if($cParams->get('custom_404_page_mode', 'html') == 'text') {
$custom404Text = strip_tags($custom404Text);
}
throw new \Exception($custom404Text, 404);
}
}
/**
* Event to manipulate the menu item dashboard in backend
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
// Do the main stage of the URL parse process
$this->processParseRules($uri);
// Do the postprocess stage of the URL parse process
$this->processParseRules($uri, self::PROCESS_AFTER);
// Check if all parts of the URL have been parsed.
// Otherwise we have an invalid URL
if (\strlen($uri->getPath()) > 0) {
throw new RouteNotFoundException(Text::_('JERROR_PAGE_NOT_FOUND'));
// 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: "404 Sorry, this page is not available! Use back arrow" is not valid header value at /home/coontra/public_html/libraries/vendor/laminas/laminas-diactoros/src/HeaderSecurity.php:135 at Laminas\Diactoros\HeaderSecurity::assertValid('404 Sorry, this page is not available! Use back arrow') (/home/coontra/public_html/libraries/vendor/laminas/laminas-diactoros/src/MessageTrait.php:392) at Laminas\Diactoros\Response::Laminas\Diactoros\{closure}('404 Sorry, this page is not available! Use back arrow') at array_map(object(Closure), array('404 Sorry, this page is not available! Use back arrow')) (/home/coontra/public_html/libraries/vendor/laminas/laminas-diactoros/src/MessageTrait.php:401) at Laminas\Diactoros\Response->filterHeaderValue(array('404 Sorry, this page is not available! Use back arrow')) (/home/coontra/public_html/libraries/vendor/laminas/laminas-diactoros/src/MessageTrait.php:208) at Laminas\Diactoros\Response->withHeader('status', '404 Sorry, this page is not available! Use back arrow') (/home/coontra/public_html/libraries/vendor/laminas/laminas-diactoros/src/MessageTrait.php:238) at Laminas\Diactoros\Response->withAddedHeader('status', '404 Sorry, this page is not available! Use back arrow') (/home/coontra/public_html/libraries/vendor/joomla/application/src/AbstractWebApplication.php:562) at Joomla\Application\AbstractWebApplication->setHeader('status', '404 Sorry, this page is not available! Use back arrow') (/home/coontra/public_html/libraries/src/Document/ErrorDocument.php:131) at Joomla\CMS\Document\ErrorDocument->render(false, array('template' => 'shaper_helixultimate', 'directory' => '/home/coontra/public_html/templates', 'debug' => false, 'csp_nonce' => 'YjBiNzc0MjY3Y2YwOThjNmQ2NTczYmIyNGI0ZmJmYWYzZTIyMDNkODJlNmUzNGM0MTQ2NDVmMDA5OWRjMjQyZWM4MjNhYTc0MWZiN2QxNmI4ZTZiYzViN2VmMmJhNDcwYTI0MDNiOTk3YjNlM2YzNjJmY2I0MzM2ZjI1ZWY5NDQ=', 'templateInherits' => '', 'params' => object(Registry))) (/home/coontra/public_html/libraries/src/Error/Renderer/HtmlRenderer.php:78) at Joomla\CMS\Error\Renderer\HtmlRenderer->render(object(Exception)) (/home/coontra/public_html/libraries/src/Exception/ExceptionHandler.php:136) at Joomla\CMS\Exception\ExceptionHandler::render(object(Exception)) (/home/coontra/public_html/libraries/src/Exception/ExceptionHandler.php:73) at Joomla\CMS\Exception\ExceptionHandler::handleException(object(Exception)) (/home/coontra/public_html/libraries/src/Application/CMSApplication.php:336) at Joomla\CMS\Application\CMSApplication->execute() (/home/coontra/public_html/includes/app.php:58) at require_once('/home/coontra/public_html/includes/app.php') (/home/coontra/public_html/index.php:32) |
[1/2]
Exception
|
---|
Exception: Sorry, this page is not available! Use back arrow at /home/coontra/public_html/plugins/system/jmap/jmap.php:1292 at PlgSystemJMap->postProcessParseRule(object(SiteRouter), object(Uri)) (/home/coontra/public_html/libraries/src/Router/Router.php:384) at Joomla\CMS\Router\Router->processParseRules(object(Uri), 'postprocess') (/home/coontra/public_html/libraries/src/Router/Router.php:150) at Joomla\CMS\Router\Router->parse(object(Uri), true) (/home/coontra/public_html/libraries/src/Application/SiteApplication.php:754) at Joomla\CMS\Application\SiteApplication->route() (/home/coontra/public_html/libraries/src/Application/SiteApplication.php:244) at Joomla\CMS\Application\SiteApplication->doExecute() (/home/coontra/public_html/libraries/src/Application/CMSApplication.php:306) at Joomla\CMS\Application\CMSApplication->execute() (/home/coontra/public_html/includes/app.php:58) at require_once('/home/coontra/public_html/includes/app.php') (/home/coontra/public_html/index.php:32) |