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

Fixed Phalcon\Session\Flash::getMessages #11946

Merged
merged 1 commit into from
Jul 3, 2016
Merged

Fixed Phalcon\Session\Flash::getMessages #11946

merged 1 commit into from
Jul 3, 2016

Conversation

sergeyklay
Copy link
Contributor

@sergeyklay sergeyklay commented Jul 3, 2016

Refs #11941

@sergeyklay sergeyklay merged commit 722d7ff into phalcon:2.1.x Jul 3, 2016
if remove === true {
unset(messages[type]);
session->set("_flashMessages", messages);
}

return returnMessages;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better implementation:

if typeof type == "string" {
    if fetch returnMessages, messages[type] {
        if remove === true {
            unset(messages[type]);
            session->set("_flashMessages", messages);
        }
        return returnMessages;
    }

    return [];
}

@sergeyklay sergeyklay added this to the 3.0.0 milestone Jul 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants