{"record":{"id":"bd89b7bbf0feeb40","repo":"moodle/moodle","slug":"file-path-not-found","errorCode":null,"errorMessage":"File $path not found!","messagePattern":"File \\$path not found!","errorType":"exception","errorClass":"PhpSpreadsheetException","httpStatus":null,"severity":"error","filePath":"public/lib/phpspreadsheet/phpspreadsheet/src/PhpSpreadsheet/Worksheet/Drawing.php","lineNumber":164,"sourceCode":"        if ($this->path === '' && $verifyFile) {\n            throw new PhpSpreadsheetException(\"File $path not found!\");\n        }\n\n        if ($this->worksheet !== null) {\n            if ($this->path !== '') {\n                $this->worksheet->getCell($this->coordinates);\n            }\n        }","sourceCodeStart":146,"sourceCodeEnd":182,"githubUrl":"https://github.com/moodle/moodle/blob/48ea8c33227277e916cdd4079dbecef448b37f2c/public/lib/phpspreadsheet/phpspreadsheet/src/PhpSpreadsheet/Worksheet/Drawing.php#L146-L182","documentation":"Thrown by Drawing::setPath() as a final catch-all when $verifyFile is true and the image could not be resolved to an actual readable image. By this point setPath has tried three resolution strategies in order: downloading the URL to a temp file, locating the entry inside the provided ZipArchive ('archive.zip#entry' syntax), and plain file_exists() — each also requiring isImage() (mime check) to pass. The path property stays empty, so the faulty input is the $path argument: a dead URL, a missing zip member, a non-existent/moved file, or a file whose MIME type is not an image.","triggerScenarios":"Thrown at public/lib/phpspreadsheet/phpspreadsheet/src/PhpSpreadsheet/Worksheet/Drawing.php:164 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the path exists and is a real image (mime starts with image/) before calling setPath().","For zip members, pass the ZipArchive in the $zip argument and use the 'archive#entry' path form.","For remote images, check the URL is reachable and downloadable, or call setPath($url, false) to skip verification.","Re-upload or restore the missing image file and update the drawing path."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"48ea8c33227277e916cdd4079dbecef448b37f2c","analyzedAt":"2026-09-14T20:34:48.527Z","contentChangedAt":"2026-09-14T20:34:48.527Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}