}
}
}
// Need to filter the default value as well
$template->template = InputFilter::getInstance()->clean($template->template, 'cmd');
// Fallback template
if (!empty($template->parent)) {
if (!is_file(JPATH_THEMES . '/' . $template->template . '/index.php')) {
if (!is_file(JPATH_THEMES . '/' . $template->parent . '/index.php')) {
public function render(\Throwable $error): string
{
$app = Factory::getApplication();
// Get the current template from the application
$template = $app->getTemplate(true);
// Push the error object into the document
$this->getDocument()->setError($error);
// Add registry file for the template asset
// 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';
* A cached switch for if this user has root access rights.
*
* @var boolean
* @since 1.7.0
*/
protected $isRoot = null;
/**
* Unique id
*
* @var integer
* @return true|null True if loaded, null otherwise
*/
public function loadClass($class)
{
if ($file = $this->findFile($class)) {
includeFile($file);
return true;
}
return null;
*
* @since 3.4
*/
public function loadClass($class)
{
if ($result = $this->loader->loadClass($class)) {
\JLoader::applyAliasFor($class);
}
return $result;
}
{
$session = $event->getSession();
if ($session->isNew()) {
$session->set('registry', new Registry());
$session->set('user', new User());
}
// Ensure the identity is loaded
if (!$this->getIdentity()) {
$this->loadIdentity($session->get('user'));
if ($event->isStopped())
{
return $event;
}
$listener($event);
}
}
return $event;
}
// Dispatch deprecated event
$this->dispatcher->dispatch('onAfterSessionStart', new SessionEvent('onAfterSessionStart', $this));
}
// Dispatch new event
$this->dispatcher->dispatch(SessionEvents::START, new SessionEvent(SessionEvents::START, $this));
}
}
/**
* Frees all session variables and destroys all data registered to a session
*/
public function has($name)
{
if (!$this->isActive())
{
$this->start();
}
return $this->store->has($name);
}
$name = $args[2] . '.' . $name;
}
}
if (parent::has($name)) {
// Parent is used because of b/c, can be changed in Joomla 5
return parent::get($name, $default);
}
/*
__CLASS__
),
E_USER_DEPRECATED
);
$instance = self::getApplication()->getSession()->get('user');
if (\is_null($id)) {
if (!($instance instanceof User)) {
$instance = User::getInstance();
}
*
* @since 3.2
*/
protected function initialiseApp($options = array())
{
$user = Factory::getUser();
// If the user is a guest we populate it with the guest user group.
if ($user->guest) {
$guestUsergroup = ComponentHelper::getParams('com_users')->get('guest_usergroup', 1);
$user->groups = array($guestUsergroup);
* @since 3.2
*/
protected function doExecute()
{
// Initialise the application
$this->initialiseApp();
// Mark afterInitialise in the profiler.
JDEBUG ? $this->profiler->mark('afterInitialise') : null;
// Route the application
$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]
Error
|
---|
Error: Attempt to assign property "template" on null at /homepages/18/d204194855/htdocs/libraries/src/Application/SiteApplication.php:488 at Joomla\CMS\Application\SiteApplication->getTemplate() (/homepages/18/d204194855/htdocs/libraries/src/Error/Renderer/HtmlRenderer.php:50) at Joomla\CMS\Error\Renderer\HtmlRenderer->render() (/homepages/18/d204194855/htdocs/libraries/src/Exception/ExceptionHandler.php:121) at Joomla\CMS\Exception\ExceptionHandler::render() (/homepages/18/d204194855/htdocs/libraries/src/Exception/ExceptionHandler.php:72) at Joomla\CMS\Exception\ExceptionHandler::handleException() (/homepages/18/d204194855/htdocs/libraries/src/Application/CMSApplication.php:323) at Joomla\CMS\Application\CMSApplication->execute() (/homepages/18/d204194855/htdocs/includes/app.php:61) at require_once('/homepages/18/d204194855/htdocs/includes/app.php') (/homepages/18/d204194855/htdocs/index.php:32) |
[1/2]
ParseError
|
---|
ParseError: syntax error, unexpected token "protected", expecting "," or ";" at /homepages/18/d204194855/htdocs/libraries/src/User/User.php:41 at Composer\Autoload\includeFile() (/homepages/18/d204194855/htdocs/libraries/vendor/composer/ClassLoader.php:428) at Composer\Autoload\ClassLoader->loadClass() (/homepages/18/d204194855/htdocs/libraries/src/Autoload/ClassLoader.php:59) at Joomla\CMS\Autoload\ClassLoader->loadClass() (/homepages/18/d204194855/htdocs/libraries/src/Application/WebApplication.php:318) at Joomla\CMS\Application\WebApplication->afterSessionStart() (/homepages/18/d204194855/htdocs/libraries/vendor/joomla/event/src/Dispatcher.php:486) at Joomla\Event\Dispatcher->dispatch() (/homepages/18/d204194855/htdocs/libraries/vendor/joomla/session/src/Session.php:444) at Joomla\Session\Session->start() (/homepages/18/d204194855/htdocs/libraries/vendor/joomla/session/src/Session.php:333) at Joomla\Session\Session->has() (/homepages/18/d204194855/htdocs/libraries/src/Session/Session.php:191) at Joomla\CMS\Session\Session->get() (/homepages/18/d204194855/htdocs/libraries/src/Factory.php:334) at Joomla\CMS\Factory::getUser() (/homepages/18/d204194855/htdocs/libraries/src/Application/SiteApplication.php:552) at Joomla\CMS\Application\SiteApplication->initialiseApp() (/homepages/18/d204194855/htdocs/libraries/src/Application/SiteApplication.php:218) at Joomla\CMS\Application\SiteApplication->doExecute() (/homepages/18/d204194855/htdocs/libraries/src/Application/CMSApplication.php:294) at Joomla\CMS\Application\CMSApplication->execute() (/homepages/18/d204194855/htdocs/includes/app.php:61) at require_once('/homepages/18/d204194855/htdocs/includes/app.php') (/homepages/18/d204194855/htdocs/index.php:32) |