我在flashmessenger版本2.1.0中遇到此错误
Warning: Class __PHP_Incomplete_Class has no unserializer in /home/test/public_html/index.php on line 17 Fatal error: Zend\Mvc\Controller\Plugin\FlashMessenger::getMessages(): The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition "Zend\Stdlib\SplQueue" of the object you are trying to operate on was loaded _before_ unserialize() gets called or provide a __autoload() function to load the class definition in /home/test/vendor/zendframework/zendframework/library/Zend/Mvc/Controller/Plugin/FlashMessenger.php on line 288
In index.php : session is started in line 17.
在控制器中:
$this->flashMessenger()->addMessage('Updated Successfully.');
$flashMessenger = $this->flashMessenger();
if($flashMessenger->hasMessages()) {
$return['messages'] = $flashMessenger->getMessages();
}
请帮助我做错了什么?
答案 0 :(得分:0)
最后,我解决了我升级到版本2.2.2
的问题,并删除了session_start()
中index page
一切正常。