Issue

ZF2-415: flashMessanger doesnt return messages added within current request

Issue Type: Bug Created: 2012-07-20T22:27:34.000+0000 Last Updated: 2012-07-21T00:42:31.000+0000 Status: Resolved Fix version(s): Reporter: Marek Nos (fabicz) Assignee: Matthew Weier O'Phinney (matthew) Tags: - Zend\Mvc\Controller

Related issues: Attachments:

Description

Within controller run this code:

<pre class="highlight">
$this->flashMessenger()->addMessage('test');
var_dump($this->flashMessenger()->hasMessages(), $this->flashMessenger()->getMessages());exit;

Expected result: - boolean true - array 0 => string 'test' (length=4)

Actual result: - boolean false - array empty

Comments

Posted by Evan Coury (evan.pro) on 2012-07-21T00:41:44.000+0000

Is there a use-case for this besides maybe unit testing? AFAIK, this is by design, and not a bug. It's also specifically why the getCurrentMessages() was added.

Posted by Evan Coury (evan.pro) on 2012-07-21T00:42:31.000+0000

Marking this as not an issue for now. Please feel free to re-open if it turns out I'm wrong.

Have you found an issue?

See the Overview section for more details.

Copyright

© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.

Contacts