mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-02 21:41:19 +08:00
Used substr_compare instead of substr when we don't care about result
This commit is contained in:
@ -333,7 +333,7 @@ class MessageController extends Controller
|
||||
ksort($translated);
|
||||
foreach ($translated as $message => $translation) {
|
||||
if (!isset($merged[$message]) && !isset($todo[$message]) && !$removeUnused) {
|
||||
if (substr($translation, 0, 2) === '@@' && substr($translation, -2) === '@@') {
|
||||
if (substr_compare($translation, '@@', 0, 2) === 0 && substr_compare($translation, '@@', -2) === 0) {
|
||||
$todo[$message] = $translation;
|
||||
} else {
|
||||
$todo[$message] = '@@' . $translation . '@@';
|
||||
|
||||
Reference in New Issue
Block a user