Commit 41c167b9 by Alexander Makarov

Merge pull request #6051 from anders-akero/patch-1

Update rest-error-handling.md
parents de896607 eb07fd3e
...@@ -77,7 +77,7 @@ return [ ...@@ -77,7 +77,7 @@ return [
'class' => 'yii\web\Response', 'class' => 'yii\web\Response',
'on beforeSend' => function ($event) { 'on beforeSend' => function ($event) {
$response = $event->sender; $response = $event->sender;
if ($response->data !== null && !empty(Yii::$app->request->get['suppress_response_code'])) { if ($response->data !== null && !empty(Yii::$app->request->get('suppress_response_code'))) {
$response->data = [ $response->data = [
'success' => $response->isSuccessful, 'success' => $response->isSuccessful,
'data' => $response->data, 'data' => $response->data,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment