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
157b1ffd
Commit
157b1ffd
authored
Dec 18, 2013
by
Qiang Xue
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1568 from cebe/jsonserializable
Json::encode did not handle JsonSerializable objects
parents
a4fe805c
060775b0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
0 deletions
+5
-0
CHANGELOG.md
framework/CHANGELOG.md
+1
-0
BaseJson.php
framework/yii/helpers/BaseJson.php
+4
-0
No files found.
framework/CHANGELOG.md
View file @
157b1ffd
...
...
@@ -11,6 +11,7 @@ Yii Framework 2 Change Log
-
Bug #1545: It was not possible to execute db Query twice, params where missing (cebe)
-
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: Json::encode() did not handle objects that implement JsonSerializable interface correctly (cebe)
-
Enh #1293: Replaced Console::showProgress() with a better approach. See Console::startProgress() for details (cebe)
-
Enh #1406: DB Schema support for Oracle Database (p0larbeer, qiangxue)
-
Enh #1437: Added ListView::viewParams (qiangxue)
...
...
framework/yii/helpers/BaseJson.php
View file @
157b1ffd
...
...
@@ -81,6 +81,10 @@ class BaseJson
*/
protected
static
function
processData
(
$data
,
&
$expressions
,
$expPrefix
)
{
if
(
$data
instanceof
\JsonSerializable
)
{
return
$data
;
}
if
(
is_object
(
$data
))
{
if
(
$data
instanceof
JsExpression
)
{
$token
=
"!{[
$expPrefix
="
.
count
(
$expressions
)
.
']}!'
;
...
...
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