IASR - Engineering and Innovation

Page 2 of 4

IASR is a Learning Organization- as described by Peter Senge of MIT-SLOAN. IASR stands for International Alliance Systems Research (IASR). We are a group of Scientist, Researcher and Engineers engaged in solving industrial problems.

 

CodeAlfa\Plugin\System\JchPageCache\Extension\JchPageCache::getUpdateHitsScript(): Argument #4 ($id) must be of type int, array given, called in /var/www/ias-research.com/public_html/plugins/system/jchpagecache/src/Extension/JchPageCache.php on line 416 (500 Whoops, looks like something went wrong.)

TypeError

HTTP 500 Whoops, looks like something went wrong.

CodeAlfa\Plugin\System\JchPageCache\Extension\JchPageCache::getUpdateHitsScript(): Argument #4 ($id) must be of type int, array given, called in /var/www/ias-research.com/public_html/plugins/system/jchpagecache/src/Extension/JchPageCache.php on line 416

Exception

TypeError

  1. }
  2. return $body;
  3. }
  4. private function getUpdateHitsScript(Container $container, string $option, string $view, int $id): string
  5. {
  6. $baseUrl = SystemUri::homePageAbsolute($container->get(PathsInterface::class));
  7. /** @see self::onAjaxUpdatehits() */
  8. $ajaxPath = 'index.php?option=com_ajax&format=json&plugin=updatehits&group=system';
  9. $url = "{$baseUrl}{$ajaxPath}&hitoption={$option}&hitview={$view}&hitid={$id}";
  1. $option = $input->getCmd('option');
  2. $view = $input->getCmd('view');
  3. $id = $input->getInt('id');
  4. if ($id > 0 && HitCounter::isSupported($option, $view)) {
  5. $script = Js::optimize($this->getUpdateHitsScript($container, $option, $view, $id));
  6. $body = str_replace('</body>', "<script type=\"module\">{$script}</script>\n</body>", $body);
  7. }
  8. return $body;
  9. }
  1. $body = $app->getBody();
  2. //Still need to validate the HTMl here. We may be on a redirect.
  3. $httpResponse = http_response_code();
  4. if (Helper::validateHtml($body) && $httpResponse === 200) {
  5. $pageCache->store(
  6. $this->addUpdateHitScript(
  7. $container,
  8. $this->addUpdateFormTokenAjax($container, $body)
  9. )
  10. );
  11. }
  1. foreach ($this->listeners[$event->getName()] as $listener) {
  2. if ($event->isStopped()) {
  3. return $event;
  4. }
  5. $listener($event);
  6. }
  7. }
  8. return $event;
  9. }
  1. $dispatcher = $this->getDispatcher();
  2. } catch (\UnexpectedValueException $exception) {
  3. return null;
  4. }
  5. return $dispatcher->dispatch($eventName, $event ?: new ApplicationEvent($eventName, $this));
  6. }
  7. /**
  8. * Method to run the application routines.
  9. *
  1. // Send the application response.
  2. $this->respond();
  3. // Trigger the onAfterRespond event.
  4. $this->dispatchEvent(
  5. 'onAfterRespond',
  6. new AfterRespondEvent('onAfterRespond', ['subject' => $this])
  7. );
  8. }
CMSApplication->execute() in /var/www/ias-research.com/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('/var/www/ias-research.com/public_html/includes/app.php') in /var/www/ias-research.com/public_html/index.php (line 51)
  1. // ... die
  2. die();
  3. }
  4. // Run the application - All executable code should be triggered through this file
  5. require_once __DIR__ . '/includes/app.php';

Stack Trace

TypeError
TypeError:
CodeAlfa\Plugin\System\JchPageCache\Extension\JchPageCache::getUpdateHitsScript(): Argument #4 ($id) must be of type int, array given, called in /var/www/ias-research.com/public_html/plugins/system/jchpagecache/src/Extension/JchPageCache.php on line 416

  at /var/www/ias-research.com/public_html/plugins/system/jchpagecache/src/Extension/JchPageCache.php:423
  at CodeAlfa\Plugin\System\JchPageCache\Extension\JchPageCache->getUpdateHitsScript()
     (/var/www/ias-research.com/public_html/plugins/system/jchpagecache/src/Extension/JchPageCache.php:416)
  at CodeAlfa\Plugin\System\JchPageCache\Extension\JchPageCache->addUpdateHitScript()
     (/var/www/ias-research.com/public_html/plugins/system/jchpagecache/src/Extension/JchPageCache.php:278)
  at CodeAlfa\Plugin\System\JchPageCache\Extension\JchPageCache->onAfterRespond()
     (/var/www/ias-research.com/public_html/libraries/vendor/joomla/event/src/Dispatcher.php:454)
  at Joomla\Event\Dispatcher->dispatch()
     (/var/www/ias-research.com/public_html/libraries/vendor/joomla/application/src/AbstractApplication.php:99)
  at Joomla\Application\AbstractApplication->dispatchEvent()
     (/var/www/ias-research.com/public_html/libraries/src/Application/CMSApplication.php:363)
  at Joomla\CMS\Application\CMSApplication->execute()
     (/var/www/ias-research.com/public_html/includes/app.php:58)
  at require_once('/var/www/ias-research.com/public_html/includes/app.php')
     (/var/www/ias-research.com/public_html/index.php:51)