Welcome Guest, Not a member yet? Register   Sign In
Bug in Session.php CI 1.7.3
#2

[eluser]Daniel_C[/eluser]
Another bug in the same file is in the line 209:
Code:
$query = $this->CI->db->get($this->sess_table_name);

// No result?  Kill it!
(line 209) if ($query->num_rows() == 0)

When the ci_sessions table does not exist in the database, the return of the get method is false, access false->num_rows() throws a fatal error.
The solution is add a comparison like this
Code:
if ($query === FALSE || $query->num_rows() == 0)

Obviously, it has no sense to use database feature when the ci_sessions table is not created.


Messages In This Thread
Bug in Session.php CI 1.7.3 - by El Forum - 12-22-2010, 11:13 AM
Bug in Session.php CI 1.7.3 - by El Forum - 12-22-2010, 12:04 PM
Bug in Session.php CI 1.7.3 - by El Forum - 12-23-2010, 03:53 AM
Bug in Session.php CI 1.7.3 - by El Forum - 12-23-2010, 06:08 PM
Bug in Session.php CI 1.7.3 - by El Forum - 12-23-2010, 06:11 PM
Bug in Session.php CI 1.7.3 - by El Forum - 12-23-2010, 11:20 PM
Bug in Session.php CI 1.7.3 - by El Forum - 12-24-2010, 02:31 AM
Bug in Session.php CI 1.7.3 - by El Forum - 12-24-2010, 08:57 AM



Theme © iAndrew 2016 - Forum software by © MyBB