#5721 - Error changing title of Download page due to no image being uploaded or provided by default
| Identifier | #5721 |
|---|---|
| Issue type | Minor issue (breaks specific functionality) |
| Title | Error changing title of Download page due to no image being uploaded or provided by default |
| Status | Completed |
| Handling member | PDStig |
| Version | 11 alpha2 |
| Addon | downloads |
| Description | PHP ERROR [1] Uncaught TypeError: edit_download_category(): Argument #6 ($rep_image) must be of type string, null given, called in cms/pages/modules/cms_downloads.php on line 1118 and defined in sources/downloads2.php:382 Stack trace: #0 cms/pages/modules/cms_downloads.php(1118): edit_download_category(1, 'Downloads', 1, '', '!--:)abcUNLIKEL...', NULL, '', '', 1713930420) #1 sources/crud_module.php(1732): Module_cms_downloads_cat->edit_actualisation('1') #2 sources/crud_module.php(508): Standard_crud_module->__edit() #3 sources/zones.php(785): Standard_crud_module->run() #4 sources/site.php(1486): load_module_page('cms/pages/modul...', 'cms_downloads') #5 sources/site.php(1101): request_page('cms_downloads', true, 'cms', NULL, false, true) #6 cms/index.php(59): do_site() #7 {main} thrown in sources/downloads2.php on line 382 |
| Steps to reproduce | |
| Funded? | No |
| Commits |
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
When editing a download category, if the rep image is not being changed, an error is thrown. This was because edit_download_category was expecting a string for $rep_image when it should have also allowed null for do not change.