Skip to content

Commit

Permalink
[#3135] - If "*" is the best language return empty
Browse files Browse the repository at this point in the history
  • Loading branch information
niden committed Jan 11, 2020
1 parent ce407c8 commit e224965
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions phalcon/Http/Request.zep
Original file line number Diff line number Diff line change
Expand Up @@ -162,9 +162,11 @@ class Request extends AbstractInjectionAware implements RequestInterface
var language;

let language = this->getBestLanguage(),
language = explode("-", language);
language = explode("-", language),
language = language[0],
language = "*" === language ? "" : language;

return language[0];
return language;
}

/**
Expand Down

0 comments on commit e224965

Please sign in to comment.