mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-25 16:19:00 +01:00
fixed not working default param of null for _cut_bytes($data,$offset,$len=null), thought it is NOT used without 3. parameter so far
This commit is contained in:
parent
8935a2d0a2
commit
1fbdb11b23
@ -240,8 +240,10 @@ class egw_session_memcache
|
||||
if (self::DEBUG > 1) error_log("\n memcache in cutbyte mb $id:$n:".print_r(mb_substr($data,$offset,$len,'ascii'),true));
|
||||
if (self::DEBUG > 1) error_log("\n memcache in cutbyte norm $id:$n:".print_r(substr($data,$offset,$len),true));
|
||||
|
||||
if (is_null($len)) $len = self::_bytes($data) - $offset;
|
||||
|
||||
if (is_null($len))
|
||||
{
|
||||
return self::$mbstring_func_overload ? mb_substr($data,$offset,self::_bytes($data),'ascii') : substr($data,$offset);
|
||||
}
|
||||
return self::$mbstring_func_overload ? mb_substr($data,$offset,$len,'ascii') : substr($data,$offset,$len);
|
||||
}
|
||||
|
||||
|
@ -125,8 +125,10 @@ class global_stream_wrapper
|
||||
*/
|
||||
private static function _cut_bytes(&$data,$offset,$len=null)
|
||||
{
|
||||
if (is_null($len)) $len = self::_bytes($data) - $offset;
|
||||
|
||||
if (is_null($len))
|
||||
{
|
||||
return self::$mbstring_func_overload ? mb_substr($data,$offset,self::_bytes($data),'ascii') : substr($data,$offset);
|
||||
}
|
||||
return self::$mbstring_func_overload ? mb_substr($data,$offset,$len,'ascii') : substr($data,$offset,$len);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user