break;
if (($s = fread($fp, 8)) == FALSE)
break;
- if (strlen($s) != 8)
+ if (mb_strlen($s, "ASCII") != 8)
break;
$arr = unpack('Ls/Li', $s);
fclose($fp);
log_only(serialize($user));
}
}
+ else {
+ if ($sess != FALSE) {
+ // This part isn't strictly required but is good to verify
+ // the coerence of cached and User class saved value of step field.
+ $old_step = $user->step;
+ $arr = Bin5_user::load_step($sess);
+ $user->step = $arr['s'];
+ if ($old_step != $user->step) {
+ log_crit("Bin5:: steps are diffetents User->step ".$user->step." Old_step: ".$old_step);
+ }
+
+ }
+ }
$user->shm_sz = $shm_sz;
break;
if (($s = fread($fp, 4)) == FALSE)
break;
- if (strlen($s) != 4)
+ if (mb_strlen($s, "ASCII") != 4)
break;
$arr = unpack('Le', $s);
if ($arr['e'] > $tm)