Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-42566

Database picture field allows non-images to be added as pictures

XMLWordPrintable

      1. Create a database activity.
      2. Create a picture field.
      3. Click on 'Add entry'.
      4. Rename a .txt file to a .jpg file and upload.
      5. You will get the following error -

      Unknown exception related to local files (File is not an image)
      line 291 of /mod/data/field/picture/field.class.php: call to debugging()
      line 254 of /mod/data/field/picture/field.class.php: call to data_field_picture->update_thumbnail()
      line 234 of /mod/data/edit.php: call to data_field_picture->update_content()
      

            markn Mark Nelson
            dmonllao David Monllaó
            Petr Skoda Petr Skoda
            Marina Glancy Marina Glancy
            Frédéric Massart Frédéric Massart
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.