Commit e606617a by Alexander Makarov

Better checks for empty string in MessageController

parent a617fdba
...@@ -387,7 +387,7 @@ class MessageController extends Controller ...@@ -387,7 +387,7 @@ class MessageController extends Controller
$merged = []; $merged = [];
$untranslated = []; $untranslated = [];
foreach ($messages as $message) { foreach ($messages as $message) {
if (array_key_exists($message, $existingMessages) && strlen($existingMessages[$message]) > 0) { if (array_key_exists($message, $existingMessages) && $existingMessages[$message] !== '') {
$merged[$message] = $existingMessages[$message]; $merged[$message] = $existingMessages[$message];
} else { } else {
$untranslated[] = $message; $untranslated[] = $message;
...@@ -499,7 +499,7 @@ EOD; ...@@ -499,7 +499,7 @@ EOD;
// merge existing message translations with new message translations // merge existing message translations with new message translations
foreach ($msgs as $message) { foreach ($msgs as $message) {
if (array_key_exists($message, $existingMessages) && strlen($existingMessages[$message]) > 0) { if (array_key_exists($message, $existingMessages) && $existingMessages[$message] !== '') {
$merged[$category . chr(4) . $message] = $existingMessages[$message]; $merged[$category . chr(4) . $message] = $existingMessages[$message];
} else { } else {
$notTranslatedYet[] = $message; $notTranslatedYet[] = $message;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment