Fix #18899: Replace usages of strpos with strncmp and remove redundant usage of array_merge and array_values

This commit is contained in:
Alexander Gubarev
2021-09-28 11:06:46 +03:00
committed by GitHub
parent f2caf02164
commit e3028c524d
17 changed files with 22 additions and 21 deletions

View File

@ -386,7 +386,7 @@ EOD;
if (!$removeUnused) {
foreach ($obsolete as $pk => $msg) {
if (strpos($msg, '@@') === 0 && substr($msg, -2) === '@@') {
if (strncmp($msg, '@@', 2) === 0 && substr($msg, -2) === '@@') {
unset($obsolete[$pk]);
}
}