Skip to content
This repository has been archived by the owner on Sep 20, 2019. It is now read-only.

Commit

Permalink
Reverts namespace import in Response
Browse files Browse the repository at this point in the history
  • Loading branch information
sergeymakinen committed Nov 24, 2016
1 parent 5f27b9c commit 829b7ad
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/Response.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@

namespace sergeymakinen\facades;

use yii\helpers\Url;

/** @noinspection PhpUnnecessaryFullyQualifiedNameInspection */
/**
* Yii::$app->get('response') facade.
Expand Down Expand Up @@ -320,7 +318,8 @@ protected static function sendFormat($format, $data, array $headers)
$response->data = $data;
foreach ($headers as $name => $value) {
if (strtolower($name) === 'location') {
$value = Url::to($value);
/** @noinspection PhpUnnecessaryFullyQualifiedNameInspection */
$value = \yii\helpers\Url::to($value);
if (strpos($value, '/') === 0 && strpos($value, '//') !== 0) {
$value = Request::getHostInfo() . $value;
}
Expand Down

0 comments on commit 829b7ad

Please sign in to comment.