Skip to content

Commit

Permalink
simpler bool check
Browse files Browse the repository at this point in the history
  • Loading branch information
visualex committed Dec 7, 2016
1 parent 125e833 commit 8951807
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Controller/Component/FlashComponent.php
Expand Up @@ -108,11 +108,11 @@ public function set($message, array $options = [])
}

$messages = [];
if ($options['clear'] === false) {
if (!$options['clear']) {
$messages = (array)$this->_session->read('Flash.' . $options['key']);
}

if ($options['duplicate'] === false) {
if (!$options['duplicate']) {
foreach ($messages as $existingMessage) {
if ($existingMessage['message'] === $message) {
return;
Expand Down

0 comments on commit 8951807

Please sign in to comment.