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

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

    XMLWordPrintable

    Details

      Description

      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()
      

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  11/Nov/13