[ci skip] Fix a bug where session IDs are not regenerated
Reported via the forums: http://forum.codeigniter.com/thread-996.html
diff --git a/system/libraries/Session/Session.php b/system/libraries/Session/Session.php
index 2551e54..ba1919b 100644
--- a/system/libraries/Session/Session.php
+++ b/system/libraries/Session/Session.php
@@ -143,8 +143,7 @@
session_start();
// Is session ID auto-regeneration configured? (ignoring ajax requests)
- if ( ! empty($_SERVER['HTTP_X_REQUESTED_WITH'])
- && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) === 'xmlhttprequest'
+ if ((empty($_SERVER['HTTP_X_REQUESTED_WITH']) OR strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) !== 'xmlhttprequest')
&& ($regenerate_time = config_item('sess_time_to_update')) > 0
)
{