Hi,
I am getting following error on our website any idea how to fix it.
[10-Jan-2019 05:50:24 UTC] PHP Fatal error: Call to a member function sendResponse() on null in /home/liveword/public_html/vendor/magento/framework/App/Bootstrap.php on line 259 [10-Jan-2019 05:50:30 UTC] PHP Fatal error: Call to a member function sendResponse() on null in /home/liveword/public_html/vendor/magento/framework/App/Bootstrap.php on line 259
Thanks in advance.
Manoj
Hello @manoj_rastogi
Please add below-shared code in the constructor:
public function __construct( \Magento\Framework\App\Response\Http $response) { $this->_response = $response; }
This is my code for constructor
public function __construct(ObjectManagerFactory $factory, $rootDir, array $initParams )
{
$this->factory = $factory;
$this->rootDir = $rootDir;
$this->server = $initParams;
}
How can i change it please help.
Thanks
Manoj
Hello @manoj_rastogi
try this once
public function __construct(ObjectManagerFactory $factory, $rootDir, array $initParams, \Magento\Framework\App\Response\Http $response )
{
$this->factory = $factory;
$this->rootDir = $rootDir;
$this->server = $initParams;
$this->_response = $response;
}
I tried but website stopped working