Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
4.0.5, 4.0.6, 4.1, 4.1.1
-
HQ Sprint 1.3 Moppies
Description
If you add an image field in the database it is possible to specify a width and height for the single and list view.
However, these fields are not being validated properly. It is possible to insert strings, for example "300px" which lead to an error as soon as a user tries to add an entry.
To reproduce:
- Create database activity
- Define a new field "Image"
- Specify "Width (in pixels) in list view" or "Height (in pixels) in list view" and set one of them to "300px". Save.
- Add a database entry: Upload an image. Save.
- With debug mode on, you will see a notice about a malformed string in PHP 7.4.
- In PHP 8.0 (and probably above) you will receive an error (also without debug mode enabled), see screenshot. This will fail the adding of the entry!
Suggested solution: Add proper validation to these fields.
Additional info: This does not occur for "Width (in pixels) in single view" and "Height (in pixels) in single view" for some reason.
Attachments
Issue Links
- will help resolve
-
MDL-35671 Menu field type in the Database activity allows empty options list.
-
- Reopened
-