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
0b28f290
Commit
0b28f290
authored
Dec 30, 2013
by
Qiang Xue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes #1704: Incorrect regexp is used in `Inflector::camelize()`
parent
1361bd3c
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
1 deletion
+3
-1
CHANGELOG.md
framework/CHANGELOG.md
+1
-0
BaseInflector.php
framework/yii/helpers/BaseInflector.php
+1
-1
InflectorTest.php
tests/unit/framework/helpers/InflectorTest.php
+1
-0
No files found.
framework/CHANGELOG.md
View file @
0b28f290
...
@@ -18,6 +18,7 @@ Yii Framework 2 Change Log
...
@@ -18,6 +18,7 @@ Yii Framework 2 Change Log
-
Bug #1631: Charset is now explicitly set to UTF-8 when serving JSON (samdark)
-
Bug #1631: Charset is now explicitly set to UTF-8 when serving JSON (samdark)
-
Bug #1635:
`yii\jui\SliderInput`
wasn't properly initialized (samdark)
-
Bug #1635:
`yii\jui\SliderInput`
wasn't properly initialized (samdark)
-
Bug #1686: ActiveForm is creating duplicated messages in error summary (qiangxue)
-
Bug #1686: ActiveForm is creating duplicated messages in error summary (qiangxue)
-
Bug #1704: Incorrect regexp is used in
`Inflector::camelize()`
(qiangxue)
-
Bug: Fixed
`Call to a member function registerAssetFiles() on a non-object`
in case of wrong
`sourcePath`
for an asset bundle (samdark)
-
Bug: Fixed
`Call to a member function registerAssetFiles() on a non-object`
in case of wrong
`sourcePath`
for an asset bundle (samdark)
-
Bug: Fixed incorrect event name for
`yii\jui\Spinner`
(samdark)
-
Bug: Fixed incorrect event name for
`yii\jui\Spinner`
(samdark)
-
Bug: Json::encode() did not handle objects that implement JsonSerializable interface correctly (cebe)
-
Bug: Json::encode() did not handle objects that implement JsonSerializable interface correctly (cebe)
...
...
framework/yii/helpers/BaseInflector.php
View file @
0b28f290
...
@@ -341,7 +341,7 @@ class BaseInflector
...
@@ -341,7 +341,7 @@ class BaseInflector
*/
*/
public
static
function
camelize
(
$word
)
public
static
function
camelize
(
$word
)
{
{
return
str_replace
(
' '
,
''
,
ucwords
(
preg_replace
(
'/[^A-Z
^a-z^
0-9]+/'
,
' '
,
$word
)));
return
str_replace
(
' '
,
''
,
ucwords
(
preg_replace
(
'/[^A-Z
a-z
0-9]+/'
,
' '
,
$word
)));
}
}
/**
/**
...
...
tests/unit/framework/helpers/InflectorTest.php
View file @
0b28f290
...
@@ -73,6 +73,7 @@ class InflectorTest extends TestCase
...
@@ -73,6 +73,7 @@ class InflectorTest extends TestCase
public
function
testCamelize
()
public
function
testCamelize
()
{
{
$this
->
assertEquals
(
"MeMySelfAndI"
,
Inflector
::
camelize
(
'me my_self-andI'
));
$this
->
assertEquals
(
"MeMySelfAndI"
,
Inflector
::
camelize
(
'me my_self-andI'
));
$this
->
assertEquals
(
"QweQweEwq"
,
Inflector
::
camelize
(
'qwe qwe^ewq'
));
}
}
public
function
testUnderscore
()
public
function
testUnderscore
()
...
...
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