apptha.com
https://www.apptha.com/forum/

Fatal Error
https://www.apptha.com/forum/viewtopic.php?f=75&t=3214
Page 1 of 1

Author:  Coriaas [ Mon Nov 04, 2019 4:20 pm ]
Post subject:  Fatal Error

Hello,
I have Install extension and I get the following error.
Fatal error: Declaration of Apptha\Airhotels\Controller\Index\Index::execute() must be compatible with Magento\Cms\Controller\Index\Index::execute($coreRoute = NULL) in /app/code/Apptha/Airhotels/Controller/Index/Index.php on line 52.

lease Need Help

<?php
/**
* Apptha
*
* NOTICE OF LICENSE
*
* This source file is subject to the EULA
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://www.apptha.com/LICENSE.txt
*
* ==============================================================
* MAGENTO EDITION USAGE NOTICE
* ==============================================================
* This package designed for Magento COMMUNITY edition
* Apptha does not guarantee correct work of this extension
* on any other Magento edition except Magento COMMUNITY edition.
* Apptha does not provide extension support in case of
* incorrect edition usage.
* ==============================================================
*
* @category Apptha
* @package Apptha_Airhotels
* @version 1.0.0
* @author Apptha Team <developers@contus.in>
* @copyright Copyright (c) 2017 Apptha. (http://www.apptha.com)
* @license http://www.apptha.com/LICENSE.txt
*
*/
namespace Apptha\Airhotels\Controller\Index;


class Index extends \Magento\Cms\Controller\Index\Index
{
public function execute(){

$objectManager = \Magento\Framework\App\ObjectManager::getInstance ();
//$airhotelsKey = $objectManager->get ( 'Apptha\Airhotels\Helper\Product' )->AirhotelsKey();
$moduleEnableornot = $objectManager->get ( 'Apptha\Airhotels\Helper\Data' )->getEnableFrontend();

if ($moduleEnableornot == 0) {
/**
* Notification Message
*/
$msg = base64_decode('PGgzIHN0eWxlPSJmbG9hdDpsZWZ0O2NvbG9yOnJlZDttYXJnaW46IDMwMHB4IDQ3NXB4OyB3aWR0aDoyNiU7IiBpZD0idGl0bGUtdGV4dCI+RW5hYmxlIEFpcmhvdGVscyB0byB2aWV3IHRoZSB3ZWJzaXRlPC9oMz4=');

$this->getResponse()->setBody ( $msg );
} else {
return parent::execute();
}
}
}

Page 1 of 1 All times are UTC + 5:30 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/