Roxanne
Roxanne

Reputation: 73

Zend Framework 2 flashMessenger hangs on addMessage

I am using flashMessenger in the model layer to send back a message to the view layer when it detects that the user is adding a duplicate record. Debugging shows that the application hangs on the addMessage statement of the following code:

if ($rowCount > 0) {
            //duplicate model, send error
            $this->flashMessenger()->addMessage('Duplicate: This model already exists');
            return $this->redirect()->toRoute('stockbook/vehicle-model', array('action'=>'index'));
        }

Any ideas on the cause of this hang will be greatly appreciated.

Upvotes: 1

Views: 31

Answers (0)

Related Questions