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
b1f4d5d4
Commit
b1f4d5d4
authored
Apr 11, 2014
by
Carsten Brandt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
allow . in input name
parent
31d0538a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
BaseHtml.php
framework/helpers/BaseHtml.php
+3
-3
No files found.
framework/helpers/BaseHtml.php
View file @
b1f4d5d4
...
@@ -1732,7 +1732,7 @@ class BaseHtml
...
@@ -1732,7 +1732,7 @@ class BaseHtml
*/
*/
public
static
function
getAttributeName
(
$attribute
)
public
static
function
getAttributeName
(
$attribute
)
{
{
if
(
preg_match
(
'/(^|.*\])(
\w
+)(\[.*|$)/'
,
$attribute
,
$matches
))
{
if
(
preg_match
(
'/(^|.*\])(
[\w\.]
+)(\[.*|$)/'
,
$attribute
,
$matches
))
{
return
$matches
[
2
];
return
$matches
[
2
];
}
else
{
}
else
{
throw
new
InvalidParamException
(
'Attribute name must contain word characters only.'
);
throw
new
InvalidParamException
(
'Attribute name must contain word characters only.'
);
...
@@ -1755,7 +1755,7 @@ class BaseHtml
...
@@ -1755,7 +1755,7 @@ class BaseHtml
*/
*/
public
static
function
getAttributeValue
(
$model
,
$attribute
)
public
static
function
getAttributeValue
(
$model
,
$attribute
)
{
{
if
(
!
preg_match
(
'/(^|.*\])(
\w
+)(\[.*|$)/'
,
$attribute
,
$matches
))
{
if
(
!
preg_match
(
'/(^|.*\])(
[\w\.]
+)(\[.*|$)/'
,
$attribute
,
$matches
))
{
throw
new
InvalidParamException
(
'Attribute name must contain word characters only.'
);
throw
new
InvalidParamException
(
'Attribute name must contain word characters only.'
);
}
}
$attribute
=
$matches
[
2
];
$attribute
=
$matches
[
2
];
...
@@ -1805,7 +1805,7 @@ class BaseHtml
...
@@ -1805,7 +1805,7 @@ class BaseHtml
public
static
function
getInputName
(
$model
,
$attribute
)
public
static
function
getInputName
(
$model
,
$attribute
)
{
{
$formName
=
$model
->
formName
();
$formName
=
$model
->
formName
();
if
(
!
preg_match
(
'/(^|.*\])(
\w
+)(\[.*|$)/'
,
$attribute
,
$matches
))
{
if
(
!
preg_match
(
'/(^|.*\])(
[\w\.]
+)(\[.*|$)/'
,
$attribute
,
$matches
))
{
throw
new
InvalidParamException
(
'Attribute name must contain word characters only.'
);
throw
new
InvalidParamException
(
'Attribute name must contain word characters only.'
);
}
}
$prefix
=
$matches
[
1
];
$prefix
=
$matches
[
1
];
...
...
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