{"record":{"id":"f5e1de089bd56115","repo":"Intervention/image","slug":"file-basename-contained-in-splfileinfo-is-no-f","errorCode":null,"errorMessage":"File \"{basename}\" contained in SplFileInfo is no file in directory \"{dirname}\"","messagePattern":"File \"(.+?)\" contained in SplFileInfo is no file in directory \"(.+?)\"","errorType":"exception","errorClass":"Intervention\\Image\\Exceptions\\FileNotFoundException","httpStatus":null,"severity":"error","filePath":"src/Traits/CanParseFilePath.php","lineNumber":107,"sourceCode":"\n        if ($path === '') {\n            throw new InvalidArgumentException('Path contained in SplFileInfo must not be an empty string');\n        }\n\n        if (!is_dir($dirname)) {\n            throw new DirectoryNotFoundException(\n                'The directory \"' . $dirname . '\" contained in SplFileInfo does not exist',\n            );\n        }\n\n        if (!file_exists($path)) {\n            throw new FileNotFoundException(\n                'File \"' . $basename . '\" contained in SplFileInfo was not found in directory \"' . $dirname . '\"',\n            );\n        }\n\n        if (!is_file($path)) {\n            throw new FileNotFoundException(\n                'File \"' . $basename . '\" contained in SplFileInfo is no file in directory \"' . $dirname . '\"',\n            );\n        }\n\n        if (!is_readable($dirname)) {\n            throw new FileNotReadableException(\n                'Directory \"' . $dirname . '\" contained in SplFileInfo is not readable',\n            );\n        }\n\n        if (!is_readable($path)) {\n            throw new FileNotReadableException(\n                'File \"' . $path . '\" contained in SplFileInfo is not readable',\n            );\n        }\n\n        $realpath = $splFileInfo->getRealPath();\n","sourceCodeStart":89,"sourceCodeEnd":125,"githubUrl":"https://github.com/Intervention/image/blob/5598b9e39751c34afc5cdee84abef77f92c26f68/src/Traits/CanParseFilePath.php#L89-L125","documentation":"Error \"File \"{basename}\" contained in SplFileInfo is no file in directory \"{dirname}\"\" thrown in Intervention/image.","triggerScenarios":"Thrown at src/Traits/CanParseFilePath.php:107 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Ensure the SplFileInfo points to a regular file, not a directory or symlink to a directory; check isFile() first","Filter directory iterators with isFile() before decoding entries","Pass the file path directly if the SplFileInfo type is uncertain"],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5598b9e39751c34afc5cdee84abef77f92c26f68","analyzedAt":"2026-08-23T02:17:31.068Z","schemaVersion":2},"datasetVersion":"2026-08-23T08:06:27.607Z"}