X-Git-Url: http://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;f=web%2Fbriskin5%2FObj%2Fbriskin5.phh;h=718fabd2dc2ed79e72229764348b4b2190ded91f;hb=eba71b701d39f4da43f91ce93d5b518430b33661;hp=3ca912b40c3db0a3f010da2d854582c77d3043ce;hpb=fe84f64017120e8fad375029239cdf1895fb9533;p=brisk.git diff --git a/web/briskin5/Obj/briskin5.phh b/web/briskin5/Obj/briskin5.phh index 3ca912b..718fabd 100644 --- a/web/briskin5/Obj/briskin5.phh +++ b/web/briskin5/Obj/briskin5.phh @@ -533,7 +533,7 @@ class Bin5_user extends User { 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); @@ -609,6 +609,19 @@ class Bin5_user extends User { 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; @@ -1145,7 +1158,7 @@ class Bin5 { 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)