{"record":{"id":"df30e2b1541be19f","repo":"filp/whoops","slug":"whoops-handler-prettypagehandler-geteditorajax-sh","errorCode":null,"errorMessage":"Whoops\\Handler\\PrettyPageHandler::getEditorAjax should always resolve to a bool; got something else instead.","messagePattern":"Whoops\\\\Handler\\\\PrettyPageHandler::getEditorAjax should always resolve to a bool; got something else instead\\.","errorType":"exception","errorClass":"UnexpectedValueException","httpStatus":null,"severity":"error","filePath":"src/Whoops/Handler/PrettyPageHandler.php","lineNumber":548,"sourceCode":"    }\n\n    /**\n     * Determine if the editor link should act as an Ajax request.\n     *\n     * @param string $filePath\n     * @param int    $line\n     *\n     * @throws UnexpectedValueException If editor resolver does not return a boolean\n     *\n     * @return bool\n     */\n    public function getEditorAjax($filePath, $line)\n    {\n        $editor = $this->getEditor($filePath, $line);\n\n        // Check that the ajax is a bool\n        if (!isset($editor['ajax']) || !is_bool($editor['ajax'])) {\n            throw new UnexpectedValueException(\n                __METHOD__ . \" should always resolve to a bool; got something else instead.\"\n            );\n        }\n        return $editor['ajax'];\n    }\n\n    /**\n     * Determines both the editor and if ajax should be used.\n     *\n     * @param string $filePath\n     * @param int    $line\n     *\n     * @return array\n     */\n    protected function getEditor($filePath, $line)\n    {\n        if (!$this->editor || (!is_string($this->editor) && !is_callable($this->editor))) {\n            return [];","sourceCodeStart":530,"sourceCodeEnd":566,"githubUrl":"https://github.com/filp/whoops/blob/fa1bc9c95a1b392fbdb8a410dbbcb1d6a030fff7/src/Whoops/Handler/PrettyPageHandler.php#L530-L566","documentation":"Error \"Whoops\\Handler\\PrettyPageHandler::getEditorAjax should always resolve to a bool; got something else instead.\" thrown in filp/whoops.","triggerScenarios":"Thrown at src/Whoops/Handler/PrettyPageHandler.php:548 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"fa1bc9c95a1b392fbdb8a410dbbcb1d6a030fff7","analyzedAt":"2026-08-21T01:30:26.400Z","schemaVersion":2},"datasetVersion":"2026-08-21T03:17:12.404Z"}