{"record":{"id":"a777762fb85e9010","repo":"PHPOffice/PhpSpreadsheet","slug":"unusable-type-gettype","errorCode":null,"errorMessage":"unusable type $gettype","messagePattern":"unusable type \\$gettype","errorType":"exception","errorClass":"SpreadsheetException","httpStatus":null,"severity":"error","filePath":"src/PhpSpreadsheet/Cell/DefaultValueBinder.php","lineNumber":86,"sourceCode":"        if (is_bool($value)) {\n            return DataType::TYPE_BOOL;\n        }\n        if ($value === '') {\n            return DataType::TYPE_STRING;\n        }\n        if ($value instanceof RichText) {\n            return DataType::TYPE_INLINE;\n        }\n        if ($value instanceof BaseDrawing) {\n            return DataType::TYPE_DRAWING_IN_CELL;\n        }\n        if ($value instanceof Stringable) {\n            $value = (string) $value;\n        }\n        if (!is_string($value)) {\n            $gettype = is_object($value) ? get_class($value) : gettype($value);\n\n            throw new SpreadsheetException(\"unusable type $gettype\");\n        }\n        if (strlen($value) > 1 && $value[0] === '=') {\n            $calculation = CalculationParserOnly::getParserInstance();\n\n            try {\n                if (empty($calculation->parseFormula($value))) {\n                    return DataType::TYPE_STRING;\n                }\n            } catch (CalculationException $e) {\n                $message = $e->getMessage();\n                if (\n                    $message === 'Formula Error: An unexpected error occurred'\n                    || str_contains($message, 'has no operands')\n                ) {\n                    return DataType::TYPE_STRING;\n                }\n            }\n","sourceCodeStart":68,"sourceCodeEnd":104,"githubUrl":"https://github.com/PHPOffice/PhpSpreadsheet/blob/65b080eef4d9fd11a5796135ab145883e5c3d6a6/src/PhpSpreadsheet/Cell/DefaultValueBinder.php#L68-L104","documentation":"Error \"unusable type $gettype\" thrown in PHPOffice/PhpSpreadsheet.","triggerScenarios":"Thrown at src/PhpSpreadsheet/Cell/DefaultValueBinder.php:86 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":"65b080eef4d9fd11a5796135ab145883e5c3d6a6","analyzedAt":"2026-08-17T05:40:41.646Z","schemaVersion":2},"datasetVersion":"2026-08-17T09:17:11.063Z"}