Skip to content
Browse files

Register a shutdown function to close the session instead of closing …

…it in the tep_redirect() function
  • Loading branch information...
1 parent 5349564 commit 9a7ee223048626fd301c11ea42fb1e8e76f59d28 @haraldpdl haraldpdl committed Feb 7, 2013
View
2 catalog/admin/includes/functions/general.php
@@ -42,8 +42,6 @@ function tep_redirect($url) {
$logger->timer_stop();
}
- tep_session_close();
-
exit;
}
View
4 catalog/admin/includes/functions/sessions.php
@@ -5,7 +5,7 @@
osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com
- Copyright (c) 2008 osCommerce
+ Copyright (c) 2013 osCommerce
Released under the GNU General Public License
*/
@@ -99,6 +99,8 @@ function tep_session_start() {
tep_redirect(tep_href_link(FILENAME_DEFAULT, '', 'NONSSL', false));
}
+ register_shutdown_function('session_write_close');
+
return session_start();
}
View
4 catalog/includes/functions/general.php
@@ -5,7 +5,7 @@
osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com
- Copyright (c) 2012 osCommerce
+ Copyright (c) 2013 osCommerce
Released under the GNU General Public License
*/
@@ -24,8 +24,8 @@ function tep_get_version() {
////
// Stop from parsing any further PHP code
+// v2.3.4 now closes the session through a registered shutdown function
function tep_exit() {
- tep_session_close();
exit();
}
View
4 catalog/includes/functions/sessions.php
@@ -5,7 +5,7 @@
osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com
- Copyright (c) 2008 osCommerce
+ Copyright (c) 2013 osCommerce
Released under the GNU General Public License
*/
@@ -99,6 +99,8 @@ function tep_session_start() {
tep_redirect(tep_href_link(FILENAME_DEFAULT, '', 'NONSSL', false));
}
+ register_shutdown_function('session_write_close');
+
return session_start();
}

0 comments on commit 9a7ee22

Please sign in to comment.
Something went wrong with that request. Please try again.