https://reviews.mahara.org/1180

** Changed in: mahara
       Status: Triaged => In Progress

-- 
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
https://bugs.launchpad.net/bugs/992930

Title:
  When an image artefact isn't present in the database, getimagesize is
  called on a directory

Status in Mahara ePortfolio:
  In Progress

Bug description:
  in /thumb.php, line 75, a call to get_dataroot_image with the fileid argument 
as the result of get_field.
  If the database doesn't contain this entry, then get_field will return false.

  in /lib/file.php, line 478 (get_dataroot_image), the $id argument is assumed 
to be an int, and the variable
  $originalimage is created using this variable, which results in a directory 
path instead of a filename if $id==false.
  On line 525, the $originalimage variable is used in a call to getimagesize, 
which stalls a bit, then throws the following:
  "PHP Notice:  getimagesize(): Read error!" and outputs a stacktrace to the 
error log.

  This bug resulted in severely increased load on a clients 1.2
  instance, which made their webserver unusable. This bug is also
  present on 1.5. A patch is attached

To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/992930/+subscriptions

_______________________________________________
Mailing list: https://launchpad.net/~mahara-contributors
Post to     : mahara-contributors@lists.launchpad.net
Unsubscribe : https://launchpad.net/~mahara-contributors
More help   : https://help.launchpad.net/ListHelp

Reply via email to