mirror of
https://github.com/filp/whoops.git
synced 2026-08-17 19:30:57 +00:00
Merge pull request #285 from andrejguran/master
getEditorHref returns false if editor is not set
This commit is contained in:
@@ -318,12 +318,16 @@ class PrettyPageHandler extends Handler
|
||||
* @throws InvalidArgumentException If editor resolver does not return a string
|
||||
* @param string $filePath
|
||||
* @param int $line
|
||||
* @return string
|
||||
* @return string|bool
|
||||
*/
|
||||
public function getEditorHref($filePath, $line)
|
||||
{
|
||||
$editor = $this->getEditor($filePath, $line);
|
||||
|
||||
if (!$editor) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Check that the editor is a string, and replace the
|
||||
// %line and %file placeholders:
|
||||
if (!isset($editor['url']) || !is_string($editor['url'])) {
|
||||
|
||||
Reference in New Issue
Block a user