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
f6ef6c97
Commit
f6ef6c97
authored
Sep 28, 2014
by
Carsten Brandt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed crash of Formatter when intl is not installed
related to #5214
parent
478da530
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
Formatter.php
framework/i18n/Formatter.php
+3
-2
No files found.
framework/i18n/Formatter.php
View file @
f6ef6c97
...
...
@@ -8,7 +8,6 @@
namespace
yii\i18n
;
use
DateTime
;
use
DateTimeInterface
;
use
IntlDateFormatter
;
use
NumberFormatter
;
use
Yii
;
...
...
@@ -1010,7 +1009,9 @@ class Formatter extends Component
// disable grouping for edge cases like 1023 to get 1023 B instead of 1,023 B
$oldThousandSeparator
=
$this
->
thousandSeparator
;
$this
->
thousandSeparator
=
''
;
$options
[
NumberFormatter
::
GROUPING_USED
]
=
false
;
if
(
$this
->
_intlLoaded
)
{
$options
[
NumberFormatter
::
GROUPING_USED
]
=
false
;
}
// format the size value
$params
=
[
// this is the unformatted number used for the plural rule
...
...
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