[eluser]JulianM[/eluser]
Hi mdriscol,
I made exactly the same as Brant explains in
his post.
For your convenience, I just put this code in MY_Session.php file under libraries.
Code:
<?php
if (! defined('BASEPATH'))
exit('No direct script access allowed');
/**
* PHP Template.
*
* http://www.avnetlabs.com/php/two-step-view-with-codeigniter
*/
class MY_Session extends CI_Session
{
function MY_Validation ()
{
parent::CI_Session();
}
// --------------------------------------------------------------------
/**
* Serialize an array
*
* This is a copy of the original from 1.7.0
* This is a bug fix for handling objects in a session
* REF: http://ellislab.com/forums/viewthread/95690/
*
* This function first converts any slashes found in the array to a temporary
* marker, so when it gets unserialized the slashes will be preserved
*
* @access private
* @param array
* @return string
*/
function _serialize ($data)
{
if (is_array($data))
{
foreach ($data as $key => $val)
{
if (! is_object($val))
$data[$key] = str_replace('\\', '{{slash}}', $val);
}
} else
{
$data = str_replace('\\', '{{slash}}', $data);
}
return serialize($data);
}
// --------------------------------------------------------------------
/**
* Unserialize
*
* This function unserializes a data string, then converts any
* temporary slash markers back to actual slashes
*
* @access private
* @param array
* @return string
*/
function _unserialize ($data)
{
$data = @unserialize(strip_slashes($data));
if (is_array($data))
{
foreach ($data as $key => $val)
{
if (! is_object($val))
$data[$key] = str_replace('{{slash}}', '\\', $val);
}
return $data;
}
return str_replace('{{slash}}', '\\', $data);
}
}
?>
[quote author="mdriscol" date="1230605086"]I tried the extend library class described in the linked post. I even edited the Session class directly and changed the affected lines but it still didn't fix it. I still get the same error when trying to log into ez_auth. How did you get it to work??[/quote]