This commit is contained in:
thinkphp
2017-07-07 11:35:47 +08:00
parent 4f92dbc170
commit 37527368b4
2 changed files with 3 additions and 13 deletions

View File

@@ -67,7 +67,7 @@ class Redirect extends Response
*/
public function getTargetUrl()
{
if (strpos($this->data, '://') || (strpos($this->data, '/') && empty($this->params))) {
if (strpos($this->data, '://') || (0 === strpos($this->data, '/') && empty($this->params))) {
return $this->data;
} else {
return Url::build($this->data, $this->params);