Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix(dav): Adapt code to support PHP 7.4 for stable25
Signed-off-by: Côme Chilliet <[email protected]>
  • Loading branch information
come-nc committed Oct 20, 2025
commit 4db1243717e62e9beacceda1827ddec5ae6237e8
12 changes: 6 additions & 6 deletions apps/dav/lib/DAV/CustomPropertiesBackend.php
Original file line number Diff line number Diff line change
Expand Up @@ -447,12 +447,12 @@ private function encodeValueForDatabase(string $name, $value): array {
"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),
);
}
}
Expand All @@ -465,7 +465,7 @@ private function encodeValueForDatabase(string $name, $value): array {
/**
* @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);
Expand Down
Loading