killed some warnings with mb_string activated: haystack is empty

This commit is contained in:
Ralf Becker 2004-07-08 12:36:21 +00:00
parent 3a14a39902
commit b24f796eb2

View File

@ -957,13 +957,13 @@
/* This is needed because of substr's handling of negative lengths */ /* This is needed because of substr's handling of negative lengths */
$baselen = strlen ($base); $baselen = strlen ($base);
$lastslashpos = strrpos ($string, $base_sep); $lastslashpos = @strrpos ($string, $base_sep);
$lastslashpos < $baselen ? $length = 0 : $length = $lastslashpos - $baselen; $length = $lastslashpos < $baselen ? 0 : $lastslashpos - $baselen;
$extra_path = $rarray['fake_extra_path'] = $rarray['real_extra_path'] = substr ($string, strlen ($base), $length); $extra_path = $rarray['fake_extra_path'] = $rarray['real_extra_path'] = substr ($string, strlen ($base), $length);
if($string[1] != ':') if($string[1] != ':')
{ {
$name = $rarray['fake_name'] = $rarray['real_name'] = substr ($string, strrpos ($string, $base_sep) + 1); $name = $rarray['fake_name'] = $rarray['real_name'] = substr ($string, @strrpos ($string, $base_sep) + 1);
} }
else else
{ {
@ -979,7 +979,7 @@
$rarray['fake_leading_dirs'] = $base . $extra_path; $rarray['fake_leading_dirs'] = $base . $extra_path;
$rarray['real_leading_dirs'] = $opp_base . $extra_path; $rarray['real_leading_dirs'] = $opp_base . $extra_path;
} }
elseif (strrpos ($rarray['fake_full_path'], $sep) == 0) elseif (@strrpos ($rarray['fake_full_path'], $sep) == 0)
{ {
/* If there is only one $sep in the path, we don't want to strip it off */ /* If there is only one $sep in the path, we don't want to strip it off */
$rarray['fake_leading_dirs'] = $sep; $rarray['fake_leading_dirs'] = $sep;