Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PSDI Army
yii2
Commits
e606617a
Commit
e606617a
authored
Jan 28, 2015
by
Alexander Makarov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Better checks for empty string in MessageController
parent
a617fdba
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
MessageController.php
framework/console/controllers/MessageController.php
+2
-2
No files found.
framework/console/controllers/MessageController.php
View file @
e606617a
...
@@ -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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment