Merge pull request #8059 from nextcloud/use-stripos

Use stripos instead of strpos(strtolower(), 'something')
This commit is contained in:
Roeland Jago Douma 2018-01-26 09:50:31 +01:00 committed by GitHub
commit 68f44a9a93
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -560,7 +560,7 @@ class Crypt {
$signaturePosition = strpos($meta, '00sig00');
// enforce signature for the new 'CTR' ciphers
if ($signaturePosition === false && strpos(strtolower($cipher), 'ctr') !== false) {
if ($signaturePosition === false && stripos($cipher, 'ctr') !== false) {
throw new GenericEncryptionException('Missing Signature', $this->l->t('Missing Signature'));
}

View file

@ -37,7 +37,7 @@ class RequestTime extends Controller {
if ($search !== '') {
$timezones = array_filter($timezones, function ($timezone) use ($search) {
return strpos(strtolower($timezone), strtolower($search)) !== false;
return stripos($timezone, $search) !== false;
});
}