Skip to content

Commit

Permalink
Added register_shutdown_function in example
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan Jansen committed Mar 7, 2014
1 parent f91ff4e commit 1f2419d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions example.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,8 @@
array($session, 'write'),
array($session, 'destroy'),
array($session, 'gc'));

// The following prevents unexpected effects when using objects as save handlers.
register_shutdown_function('session_write_close');

session_start();

0 comments on commit 1f2419d

Please sign in to comment.