* @param DataCollectorInterface $collector
*
* @throws DebugBarException
* @return $this
*/
public function addCollector(DataCollectorInterface $collector)
{
if ($collector->getName() === '__meta') {
throw new DebugBarException("'__meta' is a reserved name and cannot be used as a collector name");
}
if (isset($this->collectors[$collector->getName()])) {
if ($this->params->get('session', 1)) {
$this->debugBar->addCollector(new SessionCollector($this->params, true));
}
if ($this->params->get('profile', 1)) {
$this->debugBar->addCollector((new ProfileCollector($this->params))->setRequestEndTime($endTime));
}
if ($this->params->get('queries', 1)) {
// Remember session form token for possible future usage.
$formToken = Session::getFormToken();
if ($event->isStopped())
{
return $event;
}
$listener($event);
}
}
return $event;
}
catch (\UnexpectedValueException $exception)
{
return null;
}
return $dispatcher->dispatch($eventName, $event ?: new Event\ApplicationEvent($eventName, $this));
}
/**
* Method to run the application routines.
*
$this->dispatchEvent(ApplicationEvents::BEFORE_RESPOND);
// Set appropriate headers
$this->respond();
$this->dispatchEvent(ApplicationEvents::AFTER_RESPOND);
// Close the application after the redirect.
$this->close();
}
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
// Flag if we are on cli
$isCli = $app->isClient('cli');
// If site is offline and it's a 404 error, just go to index (to see offline message, instead of 404)
if (!$isCli && $error->getCode() == '404' && $app->get('offline') == 1) {
$app->redirect('index.php');
}
/*
* Try and determine the format to render the error page in
*
* @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';
$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'));
}
if ($setVars) {
$this->setVars($uri->getQuery(true));
// 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]
TypeError
|
---|
TypeError: Argument 1 passed to DebugBar\DebugBar::addCollector() must implement interface DebugBar\DataCollector\DataCollectorInterface, null given, called in /var/www/html/plugins/system/debug/src/Extension/Debug.php on line 303 at /var/www/html/libraries/vendor/maximebf/debugbar/src/DebugBar/DebugBar.php:59 at DebugBar\DebugBar->addCollector(null) (/var/www/html/plugins/system/debug/src/Extension/Debug.php:303) at Joomla\Plugin\System\Debug\Extension\Debug->onAfterRespond(object(ApplicationEvent)) (/var/www/html/libraries/vendor/joomla/event/src/Dispatcher.php:486) at Joomla\Event\Dispatcher->dispatch('application.after_respond', object(ApplicationEvent)) (/var/www/html/libraries/vendor/joomla/application/src/AbstractApplication.php:94) at Joomla\Application\AbstractApplication->dispatchEvent('application.after_respond') (/var/www/html/libraries/vendor/joomla/application/src/AbstractWebApplication.php:520) at Joomla\Application\AbstractWebApplication->redirect('https://letras.hom.tic.ufrj.br/index.php', 303) (/var/www/html/libraries/src/Application/CMSApplication.php:975) at Joomla\CMS\Application\CMSApplication->redirect('index.php') (/var/www/html/libraries/src/Exception/ExceptionHandler.php:94) at Joomla\CMS\Exception\ExceptionHandler::render(object(RouteNotFoundException)) (/var/www/html/libraries/src/Exception/ExceptionHandler.php:72) at Joomla\CMS\Exception\ExceptionHandler::handleException(object(RouteNotFoundException)) (/var/www/html/libraries/src/Application/CMSApplication.php:323) at Joomla\CMS\Application\CMSApplication->execute() (/var/www/html/includes/app.php:61) at require_once('/var/www/html/includes/app.php') (/var/www/html/index.php:32) |
[1/2]
RouteNotFoundException
|
---|
Joomla\CMS\Router\Exception\RouteNotFoundException: Página não encontrada at /var/www/html/libraries/src/Router/Router.php:153 at Joomla\CMS\Router\Router->parse(object(Uri), true) (/var/www/html/libraries/src/Application/SiteApplication.php:736) at Joomla\CMS\Application\SiteApplication->route() (/var/www/html/libraries/src/Application/SiteApplication.php:224) at Joomla\CMS\Application\SiteApplication->doExecute() (/var/www/html/libraries/src/Application/CMSApplication.php:294) at Joomla\CMS\Application\CMSApplication->execute() (/var/www/html/includes/app.php:61) at require_once('/var/www/html/includes/app.php') (/var/www/html/index.php:32) |