EllisLab/CodeIgniter — Issue #1071: Flash session variable is cleared after loading missing image on page(404)
Author: Darkless012
Created: 2012-02-22 16:48:32+00:00
State: open

If you set flash variable and load page with and image, that can't be displayed. It loads 404 Error page and clear all flash session vars so you can't access them anymore.

And one proposal for new method, that returns flashdata stored in current controller instance:

function latest_flashdata($key)
{
$flashdata_key = $this->flashdata_key.':new:'.$key;

if(FALSE !== ($data = $this->userdata($flashdata_key))){
return $data;
}
return $this->flashdata($key);
}