mirror of
https://github.com/nextcloud/server.git
synced 2026-06-11 09:42:09 -04:00
fix(dav): Adapt code to support PHP 7.4 for stable25
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
This commit is contained in:
parent
e5480625c4
commit
4db1243717
1 changed files with 6 additions and 6 deletions
|
|
@ -447,12 +447,12 @@ class CustomPropertiesBackend implements BackendInterface {
|
|||
"Property \"$name\" has an invalid value of type " . gettype($value),
|
||||
);
|
||||
} else {
|
||||
if (!str_starts_with($value::class, 'Sabre\\DAV\\Xml\\Property\\')
|
||||
&& !str_starts_with($value::class, 'Sabre\\CalDAV\\Xml\\Property\\')
|
||||
&& !str_starts_with($value::class, 'Sabre\\CardDAV\\Xml\\Property\\')
|
||||
&& !str_starts_with($value::class, 'OCA\\DAV\\')) {
|
||||
if (!str_starts_with(get_class($value), 'Sabre\\DAV\\Xml\\Property\\')
|
||||
&& !str_starts_with(get_class($value), 'Sabre\\CalDAV\\Xml\\Property\\')
|
||||
&& !str_starts_with(get_class($value), 'Sabre\\CardDAV\\Xml\\Property\\')
|
||||
&& !str_starts_with(get_class($value), 'OCA\\DAV\\')) {
|
||||
throw new DavException(
|
||||
"Property \"$name\" has an invalid value of class " . $value::class,
|
||||
"Property \"$name\" has an invalid value of class " . get_class($value),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
@ -465,7 +465,7 @@ class CustomPropertiesBackend implements BackendInterface {
|
|||
/**
|
||||
* @return mixed|Complex|string
|
||||
*/
|
||||
private function decodeValueFromDatabase(string $value, int $valueType): mixed {
|
||||
private function decodeValueFromDatabase(string $value, int $valueType) {
|
||||
switch ($valueType) {
|
||||
case self::PROPERTY_TYPE_XML:
|
||||
return new Complex($value);
|
||||
|
|
|
|||
Loading…
Reference in a new issue