@@ -447,12 +447,12 @@ private function encodeValueForDatabase(string $name, $value): array {
447447 "Property \"$ name \" has an invalid value of type " . gettype ($ value ),
448448 );
449449 } else {
450- if (!str_starts_with ($ value::class , 'Sabre \\DAV \\Xml \\Property \\' )
451- && !str_starts_with ($ value::class , 'Sabre \\CalDAV \\Xml \\Property \\' )
452- && !str_starts_with ($ value::class , 'Sabre \\CardDAV \\Xml \\Property \\' )
453- && !str_starts_with ($ value::class , 'OCA \\DAV \\' )) {
450+ if (!str_starts_with (get_class ( $ value) , 'Sabre \\DAV \\Xml \\Property \\' )
451+ && !str_starts_with (get_class ( $ value) , 'Sabre \\CalDAV \\Xml \\Property \\' )
452+ && !str_starts_with (get_class ( $ value) , 'Sabre \\CardDAV \\Xml \\Property \\' )
453+ && !str_starts_with (get_class ( $ value) , 'OCA \\DAV \\' )) {
454454 throw new DavException (
455- "Property \"$ name \" has an invalid value of class " . $ value::class ,
455+ "Property \"$ name \" has an invalid value of class " . get_class ( $ value) ,
456456 );
457457 }
458458 }
@@ -465,7 +465,7 @@ private function encodeValueForDatabase(string $name, $value): array {
465465 /**
466466 * @return mixed|Complex|string
467467 */
468- private function decodeValueFromDatabase (string $ value , int $ valueType ): mixed {
468+ private function decodeValueFromDatabase (string $ value , int $ valueType ) {
469469 switch ($ valueType ) {
470470 case self ::PROPERTY_TYPE_XML :
471471 return new Complex ($ value );
0 commit comments