filp/whoops · error · InvalidArgumentException

Unknown editor identifier: $editor. Known editors:implode(",

Error message

Unknown editor identifier: $editor. Known editors:implode(",", array_keys($this->editors))

What it means

Error "Unknown editor identifier: $editor. Known editors:implode(",", array_keys($this->editors))" thrown in filp/whoops.

Source

Thrown at src/Whoops/Handler/PrettyPageHandler.php:490

     *
     * Pass either the name of a configured editor, or a closure that directly
     * resolves an editor string.
     *
     * @example
     *   $run->setEditor(function($file, $line) { return "file:///{$file}"; });
     * @example
     *   $run->setEditor('sublime');
     *
     * @param string|callable $editor
     *
     * @throws InvalidArgumentException If invalid argument identifier provided
     *
     * @return static
     */
    public function setEditor($editor)
    {
        if (!is_callable($editor) && !isset($this->editors[$editor])) {
            throw new InvalidArgumentException(
                "Unknown editor identifier: $editor. Known editors:" .
                implode(",", array_keys($this->editors))
            );
        }

        $this->editor = $editor;
        return $this;
    }

    /**
     * Get the editor href for a given file and line, if available.
     *
     * @param string $filePath
     * @param int    $line
     *
     * @throws InvalidArgumentException If editor resolver does not return a string
     *
     * @return string|bool

View on GitHub (pinned to fa1bc9c95a)

When it happens

Trigger: Thrown at src/Whoops/Handler/PrettyPageHandler.php:490 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of filp/whoops@fa1bc9c95a (2026-08-21). Data as JSON: /api/errors/1f9b5980b864e871. Report an issue: GitHub.