mirror of
https://github.com/erusev/parsedown.git
synced 2023-08-10 21:13:06 +03:00
Missed one
This commit is contained in:
parent
36fac49ed8
commit
df703dcb0e
@ -52,12 +52,8 @@ final class UrlSanitiser
|
||||
*/
|
||||
private static function striAtStart($string, $needle)
|
||||
{
|
||||
$len = \strlen($needle);
|
||||
$needleLen = \strlen($needle);
|
||||
|
||||
if ($len > \strlen($string)) {
|
||||
return false;
|
||||
} else {
|
||||
return \strtolower(\substr($string, 0, $len)) === \strtolower($needle);
|
||||
}
|
||||
return \strtolower(\substr($string, 0, $needleLen)) === \strtolower($needle);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user