{"record":{"id":"a7dc74588c94bca9","repo":"nextcloud/server","slug":"property-name-has-an-invalid-value-of-type-get","errorCode":null,"errorMessage":"Property \"$name\" has an invalid value of type {gettype($value)}","messagePattern":"Property \"\\$name\" has an invalid value of type (.+?)","errorType":"exception","errorClass":"Sabre\\DAV\\Exception","httpStatus":500,"severity":"error","filePath":"apps/dav/lib/DAV/CustomPropertiesBackend.php","lineNumber":650,"sourceCode":"\t\t\t\t0,\n\t\t\t\t$e,\n\t\t\t);\n\t\t}\n\n\t\tif (is_scalar($value)) {\n\t\t\t$valueType = self::PROPERTY_TYPE_STRING;\n\t\t} elseif ($value instanceof Complex) {\n\t\t\t$valueType = self::PROPERTY_TYPE_XML;\n\t\t\t$value = $value->getXml();\n\t\t} elseif ($value instanceof Href) {\n\t\t\t$valueType = self::PROPERTY_TYPE_HREF;\n\t\t\t$value = $value->getHref();\n\t\t} else {\n\t\t\tif (is_array($value)) {\n\t\t\t\t// For array only allow scalar values\n\t\t\t\tself::checkIsArrayOfScalar($name, $value);\n\t\t\t} elseif (!is_object($value)) {\n\t\t\t\tthrow new DavException(\n\t\t\t\t\t\"Property \\\"$name\\\" has an invalid value of type \" . gettype($value),\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tif (!in_array($value::class, self::ALLOWED_SERIALIZED_CLASSES)) {\n\t\t\t\t\tthrow new DavException(\n\t\t\t\t\t\t\"Property \\\"$name\\\" has an invalid value of class \" . $value::class,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t\t$valueType = self::PROPERTY_TYPE_OBJECT;\n\t\t\t// serialize produces null character\n\t\t\t// these can not be properly stored in some databases and need to be replaced\n\t\t\t$value = str_replace(chr(0), '\\x00', serialize($value));\n\t\t}\n\t\treturn [$value, $valueType];\n\t}\n\n\t/**","sourceCodeStart":632,"sourceCodeEnd":668,"githubUrl":"https://github.com/nextcloud/server/blob/ecdeb153ffdf227235c9a7e2d13dbe0f9c817bc3/apps/dav/lib/DAV/CustomPropertiesBackend.php#L632-L668","documentation":"Error \"Property \"$name\" has an invalid value of type {gettype($value)}\" thrown in nextcloud/server.","triggerScenarios":"Thrown at apps/dav/lib/DAV/CustomPropertiesBackend.php:650 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":"ecdeb153ffdf227235c9a7e2d13dbe0f9c817bc3","analyzedAt":"2026-08-17T01:36:13.386Z","schemaVersion":2},"datasetVersion":"2026-08-17T04:17:16.089Z"}