Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Objectfs mimetype null/string handling #663

Merged
merged 1 commit into from
Jan 24, 2025

Conversation

vithushau
Copy link

Fix for Task Failure in \tool_objectfs\task\push_objects_to_storage

The task \tool_objectfs\task\push_objects_to_storage was failing with the error:
Return value must be of type string, null returned.

The root cause was identified as files with an empty mimetype in the database, which were returning null instead of a valid string.

This PR introduces a fix to ensure that when an empty mimetype is encountered, an empty string ('') is returned instead of null. This aligns with the expected return type (string) and prevents the task from failing.

@golenkovm
Copy link
Contributor

Thanks @vithushau

PS: Same change for 4.2 branch: #662

@golenkovm golenkovm merged commit 2348f52 into MOODLE_404_STABLE Jan 24, 2025
15 checks passed
@golenkovm golenkovm deleted the objectfs-mimetype-null-handling-44 branch January 24, 2025 03:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants