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
7b755389
Commit
7b755389
authored
Mar 13, 2014
by
Antonio Ramirez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixes #2739
parent
72b83fad
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
1 deletion
+3
-1
CHANGELOG.md
framework/CHANGELOG.md
+1
-0
CreateAction.php
framework/rest/CreateAction.php
+2
-1
No files found.
framework/CHANGELOG.md
View file @
7b755389
...
@@ -55,6 +55,7 @@ Yii Framework 2 Change Log
...
@@ -55,6 +55,7 @@ Yii Framework 2 Change Log
-
Bug #2653: Fixed the bug that unsetting an unpopulated AR relation would trigger exception (qiangxue)
-
Bug #2653: Fixed the bug that unsetting an unpopulated AR relation would trigger exception (qiangxue)
-
Bug #2681: Fixed the bug of php build-in server https://bugs.php.net/bug.php?id=66606 (dizews)
-
Bug #2681: Fixed the bug of php build-in server https://bugs.php.net/bug.php?id=66606 (dizews)
-
Bug #2695: Fixed the issue that
`FileValidator::isEmpty()`
always returns true for validate multiple files (ZhandosKz)
-
Bug #2695: Fixed the issue that
`FileValidator::isEmpty()`
always returns true for validate multiple files (ZhandosKz)
-
Bug #2739: Fixed the issue that
`CreateAction::run()`
was using obsolete
`Controller::createAbsoluteUrl()`
method (tonydspaniard)
-
Bug #2740: Fixed the issue that
`CaptchaAction::run()`
was using obsolete
`Controller::createUrl()`
method (tonydspaniard)
-
Bug #2740: Fixed the issue that
`CaptchaAction::run()`
was using obsolete
`Controller::createUrl()`
method (tonydspaniard)
-
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)
...
...
framework/rest/CreateAction.php
View file @
7b755389
...
@@ -10,6 +10,7 @@ namespace yii\rest;
...
@@ -10,6 +10,7 @@ namespace yii\rest;
use
Yii
;
use
Yii
;
use
yii\base\Model
;
use
yii\base\Model
;
use
yii\db\ActiveRecord
;
use
yii\db\ActiveRecord
;
use
yii\helpers\Url
;
/**
/**
* CreateAction implements the API endpoint for creating a new model from the given data.
* CreateAction implements the API endpoint for creating a new model from the given data.
...
@@ -72,7 +73,7 @@ class CreateAction extends Action
...
@@ -72,7 +73,7 @@ class CreateAction extends Action
$response
=
Yii
::
$app
->
getResponse
();
$response
=
Yii
::
$app
->
getResponse
();
$response
->
setStatusCode
(
201
);
$response
->
setStatusCode
(
201
);
$id
=
implode
(
','
,
array_values
(
$model
->
getPrimaryKey
(
true
)));
$id
=
implode
(
','
,
array_values
(
$model
->
getPrimaryKey
(
true
)));
$response
->
getHeaders
()
->
set
(
'Location'
,
$this
->
controller
->
createAbsoluteUrl
([
$this
->
viewAction
,
'id'
=>
$id
]
));
$response
->
getHeaders
()
->
set
(
'Location'
,
Url
::
toRoute
([
$this
->
viewAction
,
'id'
=>
$id
],
true
));
}
}
return
$model
;
return
$model
;
...
...
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