#5070 - Potential for t_mime_type to be NULL when editing a gallery item
| Identifier | #5070 |
|---|---|
| Issue type | Minor issue (breaks specific functionality) |
| Title | Potential for t_mime_type to be NULL when editing a gallery item |
| Status | Completed |
| Handling member | Chris Graham |
| Addon | General / Uncategorised |
| Description | When editing a gallery item, it is possible for t_mime_type to be NULL, causing type errors.
I think something is wrong when uploads.php calls get_webpage_meta_details. In that function, we have $result = cache_and_carry('cms_http_request', [$url, ['byte_limit' => 1024 * 10, 'trigger_error' => false, 'timeout' => 2.0]]);. cms_http_request might set the returned mime type to NULL, causing $result[1] to be NULL, and therefore t_mime_type to be NULL. I confirmed this both in the cache and in the output of the function. This happened when editing the default homepage hero slider images, but keeping the original image (e.g. editing the description). |
| Steps to reproduce | |
| Funded? | No |
The system will post a comment when this issue is modified (e.g., status changes). To be notified of this, click "Enable comment notifications".


Comments
Ultimately Apache does not have a default mime-type for a webp, which is why Composr did not get one to check.