Skip to content

Conversation

tcitworld
Copy link
Member

If a metadata property is declared with a number type but the value provided are not numeric, it just logs "A non-numeric value encountered at apps/dav/lib/Files/FileSearchBackend.php#486" instead of throwing a proper error.

Now with a proper error here we have the proper exception being thrown later: InvalidArgumentException Invalid property value for {http://nextcloud.org/ns}metadata-photos-original_date_time.

See nextcloud/photos#3187 for the actual issue in photos.

(I'm too lazy to add a specific test for this, but feel free to)

Checklist

@tcitworld tcitworld added this to the Nextcloud 33 milestone Sep 19, 2025
@tcitworld tcitworld requested a review from a team as a code owner September 19, 2025 09:58
@tcitworld tcitworld added bug 3. to review Waiting for reviews labels Sep 19, 2025
@tcitworld tcitworld requested review from icewind1991 and provokateurin and removed request for a team September 19, 2025 09:58
@tcitworld tcitworld requested a review from sorbaugh September 19, 2025 09:58
@tcitworld
Copy link
Member Author

/backport to stable32

@tcitworld
Copy link
Member Author

/backport to stable31

…perations with custom metadata

If a metadata property is declared with a number type but the value provided are not numeric, it
logs "A non-numeric value encountered at nextcloud/apps/dav/lib/Files/FileSearchBackend.php#486" instead of throwing a proper error.

Now with a proper error we have the proper exception being thrown: InvalidArgumentException Invalid
property value for {http://nextcloud.org/ns}metadata-photos-original_date_time

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
@tcitworld tcitworld force-pushed the handle-metadata-dav-search-error branch from 96beacb to 974cfef Compare September 19, 2025 10:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant