Welcome Guest, Not a member yet? Register   Sign In
[bug] set_flashdata() duplicates the sql queries
#1

[eluser]DeaD SouL[/eluser]
Hi,

I'm using CodeIgniter 2.0.2, and I think there is a bug with the
Code:
$this->session->set_flashdata();

here is my files

application/core/MY_Controller.php:
Code:
class MY_Controller extends CI_Controller
{
    public function __construct()
    {
        parent::__construct();
        
        // prepare the referrer flashdata
        $this->session->set_flashdata( 'referrer', current_url() );
    }
}

DATABASE: ci_2 QUERIES: 7
Code:
SELECT *
FROM (`sessions`)
WHERE `session_id` = '2ec3b4af840de652f92bf4e6a1157782'
AND `ip_address` = '127.0.0.1'
AND `user_agent` = 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/534.24'
--------------------------------------------------------------------------------
UPDATE `sessions` SET `last_activity` = 1306110677, `session_id` = 'c0ca2564317723ec587787e96f6b45df' WHERE session_id = '2ec3b4af840de652f92bf4e6a1157782'
--------------------------------------------------------------------------------
UPDATE `sessions` SET `last_activity` = 1306110677, `user_data` = 'a:2:{s:14:\"preferred_lang\";s:5:\"en-us\";s:18:\"flash:new:referrer\";s:43:\"http://localhost/ds/ci2/welcome.html\";}' WHERE `session_id` = 'c0ca2564317723ec587787e96f6b45df'
--------------------------------------------------------------------------------
UPDATE `sessions` SET `last_activity` = 1306110677, `user_data` = 'a:3:{s:14:\"preferred_lang\";s:5:\"en-us\";s:18:\"flash:new:referrer\";s:43:\"http://localhost/ds/ci2/welcome.html\";s:18:\"flash:old:referrer\";s:43:\"http://localhost/ds/ci2/welcome.html\";}' WHERE `session_id` = 'c0ca2564317723ec587787e96f6b45df'
--------------------------------------------------------------------------------
UPDATE `sessions` SET `last_activity` = 1306110677, `user_data` = 'a:2:{s:14:\"preferred_lang\";s:5:\"en-us\";s:18:\"flash:old:referrer\";s:43:\"http://localhost/ds/ci2/welcome.html\";}' WHERE `session_id` = 'c0ca2564317723ec587787e96f6b45df'
--------------------------------------------------------------------------------
DELETE FROM `sessions`
WHERE `last_activity` < 1306103477
--------------------------------------------------------------------------------
UPDATE `sessions` SET `last_activity` = 1306110677, `user_data` = 'a:3:{s:14:\"preferred_lang\";s:5:\"en-us\";s:18:\"flash:old:referrer\";s:43:\"http://localhost/ds/ci2/welcome.html\";s:18:\"flash:new:referrer\";s:43:\"http://localhost/ds/ci2/welcome.html\";}' WHERE `session_id` = 'c0ca2564317723ec587787e96f6b45df'


Is it a bug ?

Regards




Theme © iAndrew 2016 - Forum software by © MyBB