ParseError ParseError

HTTP 500 Whoops, looks like something went wrong.

syntax error, unexpected token "class", expecting "function" or "const"

Exceptions 2

ParseError

  1.         return 200;
  2.     }
  3.     
  4.     use Joomla\CMS\Date\Date;
  5. class fa_IRDate extends Date {
  6.     const DAY_NUMBER    "\x027\x03";
  7.     const DAY_NUMBER2    "\x030\x03";
  8.     const DAY_YEAR        "\x032\x03";
  9.     const MONTH_ABBR    "\x033\x03";
  10.     const MONTH_NAME    "\x034\x03";
Language->__construct('fa-IR', false) in /home/falaghso/public_html/libraries/src/Language/LanguageFactory.php (line 35)
  1.      *
  2.      * @since   4.0.0
  3.      */
  4.     public function createLanguage($lang$debug false): Language
  5.     {
  6.         return new Language($lang$debug);
  7.     }
  8. }
LanguageFactory->createLanguage('fa-IR', false) in /home/falaghso/public_html/libraries/src/Language/CachingLanguageFactory.php (line 45)
  1.      * @since   4.0.0
  2.      */
  3.     public function createLanguage($lang$debug false): Language
  4.     {
  5.         if (!isset(self::$languages[$lang $debug])) {
  6.             self::$languages[$lang $debug] = parent::createLanguage($lang$debug);
  7.         }
  8.         return self::$languages[$lang $debug];
  9.     }
  10. }
CachingLanguageFactory->createLanguage('fa-IR', false) in /home/falaghso/public_html/libraries/src/Factory.php (line 745)
  1.         );
  2.         $conf   self::getConfig();
  3.         $locale $conf->get('language');
  4.         $debug  $conf->get('debug_lang');
  5.         $lang   self::getContainer()->get(LanguageFactoryInterface::class)->createLanguage($locale$debug);
  6.         return $lang;
  7.     }
  8.     /**
Factory::createLanguage() in /home/falaghso/public_html/libraries/src/Factory.php (line 305)
  1.             ),
  2.             E_USER_DEPRECATED
  3.         );
  4.         if (!self::$language) {
  5.             self::$language self::createLanguage();
  6.         }
  7.         return self::$language;
  8.     }
  1.      */
  2.     public function __construct($options = [])
  3.     {
  4.         // Extract the internal dependencies before calling the parent constructor since it calls $this->load()
  5.         $this->app      = isset($options['app']) && $options['app'] instanceof CMSApplication $options['app'] : Factory::getApplication();
  6.         $this->language = isset($options['language']) && $options['language'] instanceof Language $options['language'] : Factory::getLanguage();
  7.         if (!isset($options['db']) || !($options['db'] instanceof DatabaseDriver)) {
  8.             @trigger_error(sprintf('Database will be mandatory in 5.0.'), E_USER_DEPRECATED);
  9.             $options['db'] = Factory::getContainer()->get(DatabaseDriver::class);
  10.         }
SiteMenu->__construct(array('app' => object(SiteApplication), 'db' => object(MysqliDriver))) in /home/falaghso/public_html/libraries/src/Menu/MenuFactory.php (line 55)
  1.         if (!\array_key_exists('db'$options)) {
  2.             $options['db'] = $this->getDatabase();
  3.         }
  4.         $instance = new $classname($options);
  5.         if ($instance instanceof CacheControllerFactoryAwareInterface) {
  6.             $instance->setCacheControllerFactory($this->getCacheControllerFactory());
  7.         }
MenuFactory->createMenu('site', array('app' => object(SiteApplication), 'db' => object(MysqliDriver))) in /home/falaghso/public_html/libraries/src/Application/CMSApplication.php (line 543)
  1.         if ($this->menuFactory === null) {
  2.             @trigger_error('Menu factory must be set in 5.0'E_USER_DEPRECATED);
  3.             $this->menuFactory $this->getContainer()->get(MenuFactoryInterface::class);
  4.         }
  5.         $this->menus[$name] = $this->menuFactory->createMenu($name$options);
  6.         // Make sure the abstract menu has the instance too, is needed for BC and will be removed with version 5
  7.         AbstractMenu::$instances[$name] = $this->menus[$name];
  8.         return $this->menus[$name];
  1.             return $this->template->template;
  2.         }
  3.         // Get the id of the active menu item
  4.         $menu $this->getMenu();
  5.         $item $menu->getActive();
  6.         if (!$item) {
  7.             $item $menu->getItem($this->input->getInt('Itemid'null));
  8.         }
  1.     public function render(\Throwable $error): string
  2.     {
  3.         $app Factory::getApplication();
  4.         // Get the current template from the application
  5.         $template $app->getTemplate(true);
  6.         // Push the error object into the document
  7.         $this->getDocument()->setError($error);
  8.         // Add registry file for the template asset
HtmlRenderer->render(object(ParseError)) in /home/falaghso/public_html/libraries/src/Exception/ExceptionHandler.php (line 136)
  1.                     'subject'  => $app,
  2.                     'document' => $renderer->getDocument(),
  3.                 ])
  4.             );
  5.             $data $renderer->render($error);
  6.             // If nothing was rendered, just use the message from the Exception
  7.             if (empty($data)) {
  8.                 $data $error->getMessage();
  9.             }
ExceptionHandler::render(object(ParseError)) in /home/falaghso/public_html/libraries/src/Exception/ExceptionHandler.php (line 73)
  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(ParseError)) in /home/falaghso/public_html/libraries/src/Application/CMSApplication.php (line 336)
  1.             );
  2.             // Trigger the onError event.
  3.             $this->dispatchEvent('onError'$event);
  4.             ExceptionHandler::handleException($event->getError());
  5.         }
  6.         // Trigger the onBeforeRespond event.
  7.         $this->dispatchEvent(
  8.             'onBeforeRespond',
CMSApplication->execute() in /home/falaghso/public_html/includes/app.php (line 58)
  1. // Set the application as global app
  2. \Joomla\CMS\Factory::$application $app;
  3. // Execute the application.
  4. $app->execute();
require_once('/home/falaghso/public_html/includes/app.php') in /home/falaghso/public_html/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';

ParseError

syntax error, unexpected token "class", expecting "function" or "const"

  1.         return ['OTHER''MORE'];
  2.     }
  3.     
  4.     use Joomla\CMS\Date\Date;
  5. class fa_IRDate extends Date {
  6.     const DAY_NUMBER    "\x027\x03";
  7.     const DAY_NUMBER2    "\x030\x03";
  8.     const DAY_YEAR        "\x032\x03";
  9.     const MONTH_ABBR    "\x033\x03";
  10.     const MONTH_NAME    "\x034\x03";
Language->__construct('fa-IR', false) in /home/falaghso/public_html/libraries/src/Language/LanguageFactory.php (line 35)
  1.      *
  2.      * @since   4.0.0
  3.      */
  4.     public function createLanguage($lang$debug false): Language
  5.     {
  6.         return new Language($lang$debug);
  7.     }
  8. }
LanguageFactory->createLanguage('fa-IR', false) in /home/falaghso/public_html/libraries/src/Language/CachingLanguageFactory.php (line 45)
  1.      * @since   4.0.0
  2.      */
  3.     public function createLanguage($lang$debug false): Language
  4.     {
  5.         if (!isset(self::$languages[$lang $debug])) {
  6.             self::$languages[$lang $debug] = parent::createLanguage($lang$debug);
  7.         }
  8.         return self::$languages[$lang $debug];
  9.     }
  10. }
CachingLanguageFactory->createLanguage('fa-IR', false) in /home/falaghso/public_html/libraries/src/Application/CMSApplication.php (line 736)
  1.         if (isset($options['language'])) {
  2.             $this->set('language'$options['language']);
  3.         }
  4.         // Build our language object
  5.         $lang $this->getContainer()->get(LanguageFactoryInterface::class)->createLanguage($this->get('language'), $this->get('debug_lang'));
  6.         // Load the language to the API
  7.         $this->loadLanguage($lang);
  8.         // Register the language object with Factory
CMSApplication->initialiseApp(array('language' => 'fa-IR')) in /home/falaghso/public_html/libraries/src/Application/SiteApplication.php (line 643)
  1.                 $options['language'] = 'en-GB';
  2.             }
  3.         }
  4.         // Finish initialisation
  5.         parent::initialiseApp($options);
  6.     }
  7.     /**
  8.      * Load the library language files for the application
  9.      *
  1.      * @since   3.2
  2.      */
  3.     protected function doExecute()
  4.     {
  5.         // Initialise the application
  6.         $this->initialiseApp();
  7.         // Mark afterInitialise in the profiler.
  8.         JDEBUG $this->profiler->mark('afterInitialise') : null;
  9.         // Route the application
  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/falaghso/public_html/includes/app.php (line 58)
  1. // Set the application as global app
  2. \Joomla\CMS\Factory::$application $app;
  3. // Execute the application.
  4. $app->execute();
require_once('/home/falaghso/public_html/includes/app.php') in /home/falaghso/public_html/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] ParseError
ParseError:
syntax error, unexpected token "class", expecting "function" or "const"

  at /home/falaghso/public_html/administrator/language/fa-IR/localise.php:97
  at Joomla\CMS\Language\Language->__construct('fa-IR', false)
     (/home/falaghso/public_html/libraries/src/Language/LanguageFactory.php:35)
  at Joomla\CMS\Language\LanguageFactory->createLanguage('fa-IR', false)
     (/home/falaghso/public_html/libraries/src/Language/CachingLanguageFactory.php:45)
  at Joomla\CMS\Language\CachingLanguageFactory->createLanguage('fa-IR', false)
     (/home/falaghso/public_html/libraries/src/Factory.php:745)
  at Joomla\CMS\Factory::createLanguage()
     (/home/falaghso/public_html/libraries/src/Factory.php:305)
  at Joomla\CMS\Factory::getLanguage()
     (/home/falaghso/public_html/libraries/src/Menu/SiteMenu.php:72)
  at Joomla\CMS\Menu\SiteMenu->__construct(array('app' => object(SiteApplication), 'db' => object(MysqliDriver)))
     (/home/falaghso/public_html/libraries/src/Menu/MenuFactory.php:55)
  at Joomla\CMS\Menu\MenuFactory->createMenu('site', array('app' => object(SiteApplication), 'db' => object(MysqliDriver)))
     (/home/falaghso/public_html/libraries/src/Application/CMSApplication.php:543)
  at Joomla\CMS\Application\CMSApplication->getMenu()
     (/home/falaghso/public_html/libraries/src/Application/SiteApplication.php:430)
  at Joomla\CMS\Application\SiteApplication->getTemplate(true)
     (/home/falaghso/public_html/libraries/src/Error/Renderer/HtmlRenderer.php:50)
  at Joomla\CMS\Error\Renderer\HtmlRenderer->render(object(ParseError))
     (/home/falaghso/public_html/libraries/src/Exception/ExceptionHandler.php:136)
  at Joomla\CMS\Exception\ExceptionHandler::render(object(ParseError))
     (/home/falaghso/public_html/libraries/src/Exception/ExceptionHandler.php:73)
  at Joomla\CMS\Exception\ExceptionHandler::handleException(object(ParseError))
     (/home/falaghso/public_html/libraries/src/Application/CMSApplication.php:336)
  at Joomla\CMS\Application\CMSApplication->execute()
     (/home/falaghso/public_html/includes/app.php:58)
  at require_once('/home/falaghso/public_html/includes/app.php')
     (/home/falaghso/public_html/index.php:32)                
[1/2] ParseError
ParseError:
syntax error, unexpected token "class", expecting "function" or "const"

  at /home/falaghso/public_html/language/fa-IR/localise.php:49
  at Joomla\CMS\Language\Language->__construct('fa-IR', false)
     (/home/falaghso/public_html/libraries/src/Language/LanguageFactory.php:35)
  at Joomla\CMS\Language\LanguageFactory->createLanguage('fa-IR', false)
     (/home/falaghso/public_html/libraries/src/Language/CachingLanguageFactory.php:45)
  at Joomla\CMS\Language\CachingLanguageFactory->createLanguage('fa-IR', false)
     (/home/falaghso/public_html/libraries/src/Application/CMSApplication.php:736)
  at Joomla\CMS\Application\CMSApplication->initialiseApp(array('language' => 'fa-IR'))
     (/home/falaghso/public_html/libraries/src/Application/SiteApplication.php:643)
  at Joomla\CMS\Application\SiteApplication->initialiseApp()
     (/home/falaghso/public_html/libraries/src/Application/SiteApplication.php:238)
  at Joomla\CMS\Application\SiteApplication->doExecute()
     (/home/falaghso/public_html/libraries/src/Application/CMSApplication.php:306)
  at Joomla\CMS\Application\CMSApplication->execute()
     (/home/falaghso/public_html/includes/app.php:58)
  at require_once('/home/falaghso/public_html/includes/app.php')
     (/home/falaghso/public_html/index.php:32)