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
db6f62a4
Commit
db6f62a4
authored
Nov 05, 2014
by
Klimov Paul
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of github.com:yiisoft/yii2
parents
001d5b16
f423f157
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
3 deletions
+4
-3
input-validation.md
docs/guide/input-validation.md
+2
-2
CHANGELOG.md
framework/CHANGELOG.md
+1
-0
BaseArrayHelper.php
framework/helpers/BaseArrayHelper.php
+1
-1
No files found.
docs/guide/input-validation.md
View file @
db6f62a4
Validating Input
================
As a rule of thumb, you should never trust the data received from end users and should always validate
them
before putting
them
to good use.
As a rule of thumb, you should never trust the data received from end users and should always validate
it
before putting
it
to good use.
Given a
[
model
](
structure-models.md
)
populated with user inputs, you can validate the inputs by calling the
[
[yii\base\Model::validate()
]
] method. The method will return a boolean value indicating whether the validation
...
...
framework/CHANGELOG.md
View file @
db6f62a4
...
...
@@ -17,6 +17,7 @@ Yii Framework 2 Change Log
-
Bug #5745: Gii and debug modules may cause 404 exception when the route contains dashes (qiangxue)
-
Bug #5780:
`QueryBuilder::batchInsert()`
may cause "undefined index" error (qiangxue)
-
Bug #5833: The
`message`
command fails with a FK constraint error when trying to update messages (qiangxue)
-
Bug #5925:
`ArrayHelper::htmlEncode()`
does not work properly when the value being encoded is a nested array (tebazil)
-
Bug: Gii console command help information does not contain global options (qiangxue)
-
Bug:
`yii\web\UrlRule`
was unable to create URLs for rules containing unicode characters (samdark)
-
Enh #5223: Query builder now supports selecting sub-queries as columns (qiangxue)
...
...
framework/helpers/BaseArrayHelper.php
View file @
db6f62a4
...
...
@@ -462,7 +462,7 @@ class BaseArrayHelper
if
(
is_string
(
$value
))
{
$d
[
$key
]
=
htmlspecialchars
(
$value
,
ENT_QUOTES
,
$charset
);
}
elseif
(
is_array
(
$value
))
{
$d
[
$key
]
=
static
::
htmlEncode
(
$value
,
$charset
);
$d
[
$key
]
=
static
::
htmlEncode
(
$value
,
$
valuesOnly
,
$
charset
);
}
}
...
...
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