[fix]
This commit is contained in:
parent
f28cff5387
commit
ea43b1c9de
|
@ -111,6 +111,7 @@
|
|||
global $f_accesslog;
|
||||
|
||||
/* (5) Update global state */
|
||||
global $f_gstate;
|
||||
$state = get_gstate();
|
||||
|
||||
// manage error
|
||||
|
@ -210,7 +211,8 @@
|
|||
|
||||
|
||||
/* (2) Update the state file */
|
||||
$written = @file_put_contents(STATE_CONF, $state);
|
||||
$f_gstate->seek(0);
|
||||
$written = $f_gstate->fwrite($state);
|
||||
|
||||
/* (3) Manage error */
|
||||
if( $written === false )
|
||||
|
@ -261,7 +263,7 @@
|
|||
/* (1) Read accesses */
|
||||
$f_auth = new SplFileObject(AUTH_CONF, 'r');
|
||||
$f_actions = new SplFileObject(ACTIONS_CONF, 'r');
|
||||
$f_gstate = new SplFileObject(STATE_CONF, 'r');
|
||||
$f_gstate = new SplFileObject(STATE_CONF, 'w');
|
||||
|
||||
/* (2) Append accesses (logs) */
|
||||
$f_accesslog = new SplFileObject(DEFAULT_DATA, 'a');
|
||||
|
|
Loading…
Reference in New Issue