File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -20,15 +20,17 @@ class MySessionStorage extends Object implements SessionHandlerInterface
2020 function open ($ savePath , $ sessionName )
2121 {
2222 $ this ->path = $ savePath ;
23+ return TRUE ;
2324 }
2425
2526 function close ()
2627 {
28+ return TRUE ;
2729 }
2830
2931 function read ($ id )
3032 {
31- return @file_get_contents ("$ this ->path /sess_ $ id " );
33+ return ( string ) @file_get_contents ("$ this ->path /sess_ $ id " );
3234 }
3335
3436 function write ($ id , $ data )
@@ -38,7 +40,7 @@ class MySessionStorage extends Object implements SessionHandlerInterface
3840
3941 function destroy ($ id )
4042 {
41- return @unlink ("$ this ->path /sess_ $ id " );
43+ return ! is_file ( " $ this -> path /sess_ $ id " ) || @unlink ("$ this ->path /sess_ $ id " );
4244 }
4345
4446 function gc ($ maxlifetime )
You can’t perform that action at this time.
0 commit comments