Skip to content

Commit

Permalink
Attempt fix for issue #1490 with notice queued by session sometimes n…
Browse files Browse the repository at this point in the history
…ot getting displayed
  • Loading branch information
ryancramerdesign committed Nov 6, 2015
1 parent 96b71af commit aff0f01
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
12 changes: 11 additions & 1 deletion wire/core/Session.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ public function __construct() {
list($text, $flags) = $item;
parent::$type($text, $flags);
}
$this->remove($type);
// $this->remove($type);
}

$this->setTrackChanges(true);
Expand Down Expand Up @@ -749,4 +749,14 @@ public function getHistory() {
return $value;
}

/**
* Remove queued notices
*
*/
public function removeNotices() {
foreach(array('message', 'error', 'warning') as $type) {
$this->remove($type);
}
}

}
1 change: 1 addition & 0 deletions wire/core/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -146,5 +146,6 @@ function _checkForHttpHostError($config) {
} else {
if(!strlen($content)) $content = '<p>' . __('The process returned no content.') . '</p>';
require($config->paths->adminTemplates . 'default.php');
$session->removeNotices();
}

0 comments on commit aff0f01

Please sign in to comment.