{"record":{"id":"49855d6562ded139","repo":"PHPOffice/PhpSpreadsheet","slug":"unable-to-bind-unstringable-gettype-value-49855d","errorCode":null,"errorMessage":"Unable to bind unstringable ' . gettype($value)","messagePattern":"Unable to bind unstringable ' \\. gettype\\(\\$value\\)","errorType":"exception","errorClass":"SpreadsheetException","httpStatus":null,"severity":"error","filePath":"src/PhpSpreadsheet/Cell/StringValueBinder.php","lineNumber":85,"sourceCode":"        $this->convertNumeric = $suppressConversion;\n        $this->convertFormula = $suppressConversion;\n\n        return $this;\n    }\n\n    /**\n     * Bind value to a cell.\n     *\n     * @param Cell $cell Cell to bind value to\n     * @param mixed $value Value to bind in cell\n     */\n    public function bindValue(Cell $cell, mixed $value): bool\n    {\n        if (is_object($value)) {\n            return $this->bindObjectValue($cell, $value);\n        }\n        if ($value !== null && !is_scalar($value)) {\n            throw new SpreadsheetException('Unable to bind unstringable ' . gettype($value));\n        }\n\n        // sanitize UTF-8 strings\n        if (is_string($value)) {\n            $value = StringHelper::sanitizeUTF8($value);\n        }\n\n        $ignoredErrors = false;\n        if ($value === null && $this->convertNull === false) {\n            $cell->setValueExplicit($value, DataType::TYPE_NULL);\n        } elseif (is_bool($value) && $this->convertBoolean === false) {\n            $cell->setValueExplicit($value, DataType::TYPE_BOOL);\n        } elseif ((is_int($value) || is_float($value)) && $this->convertNumeric === false) {\n            $cell->setValueExplicit($value, DataType::TYPE_NUMERIC);\n        } elseif (is_string($value) && strlen($value) > 1 && $value[0] === '=' && $this->convertFormula === false && parent::dataTypeForValue($value) === DataType::TYPE_FORMULA) {\n            $cell->setValueExplicit($value, DataType::TYPE_FORMULA);\n        } else {\n            $ignoredErrors = is_numeric($value);","sourceCodeStart":67,"sourceCodeEnd":103,"githubUrl":"https://github.com/PHPOffice/PhpSpreadsheet/blob/65b080eef4d9fd11a5796135ab145883e5c3d6a6/src/PhpSpreadsheet/Cell/StringValueBinder.php#L67-L103","documentation":"Error \"Unable to bind unstringable ' . gettype($value)\" thrown in PHPOffice/PhpSpreadsheet.","triggerScenarios":"Thrown at src/PhpSpreadsheet/Cell/StringValueBinder.php:85 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"}