array_unshift($params, implode('', $types)); if (!\call_user_func_array([$this->statement, 'bind_param'], $params)) { throw new PrepareStatementFailureException($this->statement->error, $this->statement->errno); } } elseif ($parameters !== null) { if (!$this->bindValues($parameters)) $this->statement->bindParam($key, $obj->value, $obj->dataType); } try { $this->executed = $this->statement->execute(); // If there is a monitor registered, let it know we have finished this query if ($this->monitor) { $this->monitor->stopQuery(); */ public function getIterator($column = null, $class = \stdClass::class) { if (!$this->executed) { $this->execute(); } /** * Calling setQuery free's the statement from the iterator which will break the iterator. * So we set statement to null so that freeResult on the statement here has no affect. ) ->bind(':currentDate2', $currentDate) ->order($this->db->quoteName('m.lft')); $items = []; $iterator = $this->db->setQuery($query)->getIterator(); foreach ($iterator as $item) { $items[$item->id] = new MenuItem((array) $item); } $referenceArgs = &$args; } // Just execute the callback if caching is disabled. if (empty($this->options['caching'])) { return \call_user_func_array($callback, $referenceArgs); } if (!$id) { // Generate an ID $id = $this->_makeId($callback, $args); try { /** @var CallbackController $cache */ $cache = $this->getCacheControllerFactory()->createCacheController('callback', ['defaultgroup' => 'com_menus']); $this->items = $cache->get($loader, [], md5(\get_class($this)), false); } catch (CacheExceptionInterface $e) { try { $this->items = $loader(); } catch (ExecutionFailureException $databaseException) { $this->app->enqueueMessage(Text::sprintf('JERROR_LOADING_MENUS', $databaseException->getMessage()), 'warning'); * @since 1.5 */ public function getMenu() { if (!$this->itemsLoaded) { $this->load(); foreach ($this->items as $item) { if ($item->home) { $this->default[trim($item->language)] = $item->id; } */ public function getItem($id) { $result = null; if (isset($this->getMenu()[$id])) { $result = &$this->getMenu()[$id]; } return $result; } // Get the id of the active menu item $menu = $this->getMenu(); $item = $menu->getActive(); if (!$item) { $item = $menu->getItem($this->input->getInt('Itemid', null)); } $id = 0; if (\is_object($item)) { 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 filerequire_once dirname(__FILE__) . '/includes/app.php'; array_unshift($params, implode('', $types)); if (!\call_user_func_array([$this->statement, 'bind_param'], $params)) { throw new PrepareStatementFailureException($this->statement->error, $this->statement->errno); } } elseif ($parameters !== null) { if (!$this->bindValues($parameters)) $this->statement->bindParam($key, $obj->value, $obj->dataType); } try { $this->executed = $this->statement->execute(); // If there is a monitor registered, let it know we have finished this query if ($this->monitor) { $this->monitor->stopQuery(); */ public function getIterator($column = null, $class = \stdClass::class) { if (!$this->executed) { $this->execute(); } /** * Calling setQuery free's the statement from the iterator which will break the iterator. * So we set statement to null so that freeResult on the statement here has no affect. ) ->bind(':currentDate2', $currentDate) ->order($this->db->quoteName('m.lft')); $items = []; $iterator = $this->db->setQuery($query)->getIterator(); foreach ($iterator as $item) { $items[$item->id] = new MenuItem((array) $item); } $referenceArgs = &$args; } // Just execute the callback if caching is disabled. if (empty($this->options['caching'])) { return \call_user_func_array($callback, $referenceArgs); } if (!$id) { // Generate an ID $id = $this->_makeId($callback, $args); try { /** @var CallbackController $cache */ $cache = $this->getCacheControllerFactory()->createCacheController('callback', ['defaultgroup' => 'com_menus']); $this->items = $cache->get($loader, [], md5(\get_class($this)), false); } catch (CacheExceptionInterface $e) { try { $this->items = $loader(); } catch (ExecutionFailureException $databaseException) { $this->app->enqueueMessage(Text::sprintf('JERROR_LOADING_MENUS', $databaseException->getMessage()), 'warning'); * @since 1.5 */ public function getMenu() { if (!$this->itemsLoaded) { $this->load(); foreach ($this->items as $item) { if ($item->home) { $this->default[trim($item->language)] = $item->id; } */ public function getItem($id) { $result = null; if (isset($this->getMenu()[$id])) { $result = &$this->getMenu()[$id]; } return $result; } // Get the id of the active menu item $menu = $this->getMenu(); $item = $menu->getActive(); if (!$item) { $item = $menu->getItem($this->input->getInt('Itemid', null)); } $id = 0; if (\is_object($item)) { * @return string */ public static function themeName() { //return self::getInstance()->getDocument()->template; return JFactory::getApplication()->getTemplate(); } /** * Get Template name * @return string */ public static function themePath($base=false) { if( $base==true ) return JURI::root(true).'/templates/'.self::getInstance()->themeName(); return JPATH_THEMES . '/' . self::getInstance()->themeName(); } /** * Get theme path * @return string * @param string $path * @return self */ private static function _Import($path, $helix) { $intheme = self::getInstance()->themePath() . '/' . $path; $inplugin = self::getInstance()->frameworkPath() . '/' . $path; if( file_exists( $intheme ) && !is_dir( $intheme ) ){ self::getInstance()->importedFiles[] = $intheme; require_once $intheme; * @return self */ public static function Import($paths, $helix=false) { if( is_array($paths) ) foreach((array) $paths as $file) self::_Import( $file ); else self::_Import( $paths, $helix ); return self::getInstance(); } /** * Single file import if (!JFactory::getApplication()->isClient('administrator')) { if( JVERSION >= 3 ){ // override core joomla 3 class if (!class_exists('JViewLegacy', false)) self::getInstance()->Import('core/classes/joomla30/viewlegacy.php'); if (!class_exists('JModuleHelper', false)) self::getInstance()->Import('core/classes/joomla30/helper.php'); } else { // override core joomla 2.5 class if (!class_exists('JHtmlBehavior', false)) self::getInstance()->Import('core/classes/joomla25/behavior.php'); { $helix_path = JPATH_PLUGINS.'/system/helix/core/helix.php'; if (file_exists($helix_path)) { require_once($helix_path); Helix::getInstance() ->loadHelixOverwrite() ->importShortCodeFiles(); } } } // Convert to indexed array for unpacking. $arguments = \array_values($arguments); $result = $this->{$methodName}(...$arguments); // Ignore null results if ($result === null) { return; } if ($event->isStopped()) { return $event; } $listener($event); } } return $event; } $event = new $className($eventName, $args); } else { throw new \InvalidArgumentException('The arguments must either be an event or an array'); } $result = $dispatcher->dispatch($eventName, $event); // @todo - There are still test cases where the result isn't defined, temporarily leave the isset check in place return !isset($result['result']) || \is_null($result['result']) ? [] : $result['result']; }} // Load the behaviour plugins PluginHelper::importPlugin('behaviour'); // Trigger the onAfterInitialise event. PluginHelper::importPlugin('system'); $this->triggerEvent('onAfterInitialise'); } /** * Checks if HTTPS is forced in the client configuration. * $options['language'] = 'en-GB'; } } // Finish initialisation parent::initialiseApp($options); } /** * Load the library language files for the application * * @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 filerequire_once dirname(__FILE__) . '/includes/app.php';|
[2/2]
PrepareStatementFailureException
|
|---|
Joomla\Database\Exception\PrepareStatementFailureException:
at /var/www/alfaris.Jo/libraries/vendor/joomla/database/src/Mysqli/MysqliStatement.php:422
at Joomla\Database\Mysqli\MysqliStatement->execute()
(/var/www/alfaris.Jo/libraries/vendor/joomla/database/src/DatabaseDriver.php:687)
at Joomla\Database\DatabaseDriver->execute()
(/var/www/alfaris.Jo/libraries/vendor/joomla/database/src/DatabaseDriver.php:1088)
at Joomla\Database\DatabaseDriver->getIterator()
(/var/www/alfaris.Jo/libraries/src/Menu/SiteMenu.php:164)
at Joomla\CMS\Menu\SiteMenu->Joomla\CMS\Menu\{closure}()
(/var/www/alfaris.Jo/libraries/src/Cache/Controller/CallbackController.php:51)
at Joomla\CMS\Cache\Controller\CallbackController->get(object(Closure), array(), 'd17e8e13b99b4d9bf23a7d0b83a466c3', false)
(/var/www/alfaris.Jo/libraries/src/Menu/SiteMenu.php:177)
at Joomla\CMS\Menu\SiteMenu->load()
(/var/www/alfaris.Jo/libraries/src/Menu/AbstractMenu.php:333)
at Joomla\CMS\Menu\AbstractMenu->getMenu()
(/var/www/alfaris.Jo/libraries/src/Menu/AbstractMenu.php:164)
at Joomla\CMS\Menu\AbstractMenu->getItem(null)
(/var/www/alfaris.Jo/libraries/src/Application/SiteApplication.php:422)
at Joomla\CMS\Application\SiteApplication->getTemplate(true)
(/var/www/alfaris.Jo/libraries/src/Error/Renderer/HtmlRenderer.php:50)
at Joomla\CMS\Error\Renderer\HtmlRenderer->render(object(PrepareStatementFailureException))
(/var/www/alfaris.Jo/libraries/src/Exception/ExceptionHandler.php:126)
at Joomla\CMS\Exception\ExceptionHandler::render(object(PrepareStatementFailureException))
(/var/www/alfaris.Jo/libraries/src/Exception/ExceptionHandler.php:72)
at Joomla\CMS\Exception\ExceptionHandler::handleException(object(PrepareStatementFailureException))
(/var/www/alfaris.Jo/libraries/src/Application/CMSApplication.php:322)
at Joomla\CMS\Application\CMSApplication->execute()
(/var/www/alfaris.Jo/includes/app.php:61)
at require_once('/var/www/alfaris.Jo/includes/app.php')
(/var/www/alfaris.Jo/index.php:32)
|
|
[1/2]
PrepareStatementFailureException
|
|---|
Joomla\Database\Exception\PrepareStatementFailureException:
at /var/www/alfaris.Jo/libraries/vendor/joomla/database/src/Mysqli/MysqliStatement.php:422
at Joomla\Database\Mysqli\MysqliStatement->execute()
(/var/www/alfaris.Jo/libraries/vendor/joomla/database/src/DatabaseDriver.php:687)
at Joomla\Database\DatabaseDriver->execute()
(/var/www/alfaris.Jo/libraries/vendor/joomla/database/src/DatabaseDriver.php:1088)
at Joomla\Database\DatabaseDriver->getIterator()
(/var/www/alfaris.Jo/libraries/src/Menu/SiteMenu.php:164)
at Joomla\CMS\Menu\SiteMenu->Joomla\CMS\Menu\{closure}()
(/var/www/alfaris.Jo/libraries/src/Cache/Controller/CallbackController.php:51)
at Joomla\CMS\Cache\Controller\CallbackController->get(object(Closure), array(), 'd17e8e13b99b4d9bf23a7d0b83a466c3', false)
(/var/www/alfaris.Jo/libraries/src/Menu/SiteMenu.php:177)
at Joomla\CMS\Menu\SiteMenu->load()
(/var/www/alfaris.Jo/libraries/src/Menu/AbstractMenu.php:333)
at Joomla\CMS\Menu\AbstractMenu->getMenu()
(/var/www/alfaris.Jo/libraries/src/Menu/AbstractMenu.php:164)
at Joomla\CMS\Menu\AbstractMenu->getItem(null)
(/var/www/alfaris.Jo/libraries/src/Application/SiteApplication.php:422)
at Joomla\CMS\Application\SiteApplication->getTemplate()
(/var/www/alfaris.Jo/plugins/system/helix/core/helix.php:65)
at Helix::themeName()
(/var/www/alfaris.Jo/plugins/system/helix/core/helix.php:114)
at Helix::themePath()
(/var/www/alfaris.Jo/plugins/system/helix/core/helix.php:302)
at Helix::_Import('core/classes/joomla30/viewlegacy.php', false)
(/var/www/alfaris.Jo/plugins/system/helix/core/helix.php:290)
at Helix::Import('core/classes/joomla30/viewlegacy.php')
(/var/www/alfaris.Jo/plugins/system/helix/core/helix.php:1592)
at Helix::loadHelixOverwrite()
(/var/www/alfaris.Jo/plugins/system/helix/helix.php:22)
at plgSystemHelix->onAfterInitialise()
(/var/www/alfaris.Jo/libraries/src/Plugin/CMSPlugin.php:289)
at Joomla\CMS\Plugin\CMSPlugin->Joomla\CMS\Plugin\{closure}(object(Event))
(/var/www/alfaris.Jo/libraries/vendor/joomla/event/src/Dispatcher.php:486)
at Joomla\Event\Dispatcher->dispatch('onAfterInitialise', object(Event))
(/var/www/alfaris.Jo/libraries/src/Application/EventAware.php:111)
at Joomla\CMS\Application\WebApplication->triggerEvent('onAfterInitialise')
(/var/www/alfaris.Jo/libraries/src/Application/CMSApplication.php:745)
at Joomla\CMS\Application\CMSApplication->initialiseApp(array('language' => 'en-GB'))
(/var/www/alfaris.Jo/libraries/src/Application/SiteApplication.php:635)
at Joomla\CMS\Application\SiteApplication->initialiseApp()
(/var/www/alfaris.Jo/libraries/src/Application/SiteApplication.php:226)
at Joomla\CMS\Application\SiteApplication->doExecute()
(/var/www/alfaris.Jo/libraries/src/Application/CMSApplication.php:293)
at Joomla\CMS\Application\CMSApplication->execute()
(/var/www/alfaris.Jo/includes/app.php:61)
at require_once('/var/www/alfaris.Jo/includes/app.php')
(/var/www/alfaris.Jo/index.php:32)
|