mirror of
https://github.com/danielstjules/Stringy.git
synced 2025-09-02 17:42:58 +02:00
Merge pull request #59 from usernam3/master
Typecast comparison in startsWith/endsWith
This commit is contained in:
@@ -646,7 +646,7 @@ class Stringy implements \Countable, \IteratorAggregate, \ArrayAccess
|
||||
$startOfStr = mb_strtolower($startOfStr, $this->encoding);
|
||||
}
|
||||
|
||||
return $substring === $startOfStr;
|
||||
return (string) $substring === $startOfStr;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -671,7 +671,7 @@ class Stringy implements \Countable, \IteratorAggregate, \ArrayAccess
|
||||
$endOfStr = mb_strtolower($endOfStr, $this->encoding);
|
||||
}
|
||||
|
||||
return $substring === $endOfStr;
|
||||
return (string) $substring === $endOfStr;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user