Fix potential session writing issue
authorMichael M Slusarz <slusarz@curecanti.org>
Thu, 8 Oct 2009 21:44:29 +0000 (15:44 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Thu, 8 Oct 2009 21:44:29 +0000 (15:44 -0600)
This allegedly was needed as of 5.0.5, but I first started to see the
undesirable behavior as of 5.2.10/5.3.

framework/SessionHandler/lib/Horde/SessionHandler.php

index 3afd557..3fa630e 100644 (file)
@@ -151,6 +151,11 @@ class Horde_SessionHandler
             $_SESSION['sessionhandler'] = $curr_time + (ini_get('session.gc_maxlifetime') / 2);
             $this->_force = true;
         }
+
+        /* This is necessary as of PHP 5.0.5 because objects are not available
+         * when the write() handler is called at the end of a session
+         * access. */
+        session_write_close();
     }
 
     /**