View Issue Details

IDProjectCategoryView StatusLast Update
0005070Composr alpha bug reports[All Projects] General / Uncategorisedpublic2022-11-21 21:27
ReporterPatrick SchmalstigAssigned ToChris Graham 
SeverityMinor-bug 
Status resolvedResolutionfixed 
Summary0005070: Potential for t_mime_type to be NULL when editing a gallery item
DescriptionWhen 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).
TagsNo tags attached.
Sponsorship open

Activities

Chris Graham

2022-11-21 21:27

administrator   ~0007686

Fixed cases of mime-type being null but passed through to processing on it.

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

Issue History

Date Modified Username Field Change
2022-11-21 19:39 Patrick Schmalstig New Issue
2022-11-21 19:39 Patrick Schmalstig Status non-assigned => assigned
2022-11-21 19:39 Patrick Schmalstig Assigned To => Chris Graham
2022-11-21 19:40 Patrick Schmalstig Description Updated View Revisions
2022-11-21 21:27 Chris Graham Status assigned => resolved
2022-11-21 21:27 Chris Graham Resolution open => fixed
2022-11-21 21:27 Chris Graham Note Added: 0007686
2023-02-26 18:29 Chris Graham Category General => General / Uncategorised