Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Flash\Session output() throws exception when session is empty #14023

Closed
zsilbi opened this issue Apr 29, 2019 · 1 comment
Closed

[BUG] Flash\Session output() throws exception when session is empty #14023

zsilbi opened this issue Apr 29, 2019 · 1 comment
Labels
bug A bug report status: medium Medium

Comments

@zsilbi
Copy link
Member

zsilbi commented Apr 29, 2019

Actual Behavior

Flash is initialized in bootstrap.

$di->set('flashSession', function () {
   return new \Phalcon\Flash\Session();
});

In index.volt

<div id="flash-messages">{{ flashSession.output() }}</div>

Result when there are no messages:

phalcon/Flash/Session.zep:90: [Exception] The argument is not initialized or iterable()

Expected behavior would be an empty output.

Details

  • Phalcon version: 4.0.0-alpha.4
  • PHP Version: 7.2.16 and 7.3.4
  • Operating System: Ubuntu 16.04
  • Installation type: Compiling from source
  • Zephir version (if any): Version 0.11.12
  • Server: nginx
  • Other related info (Database, table schema): MariaDB 10.1.37
@niden
Copy link
Member

niden commented Apr 29, 2019

Addressed in: #14024

@niden niden closed this as completed Apr 29, 2019
@niden niden added the 4.0 label Jun 21, 2019
@niden niden added bug A bug report status: medium Medium and removed Bug - Medium labels Dec 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A bug report status: medium Medium
Projects
None yet
Development

No branches or pull requests

2 participants