mahara-contributors team mailing list archive
-
mahara-contributors team
-
Mailing list archive
-
Message #09082
[Bug 992930] A change has been merged
Reviewed: https://reviews.mahara.org/1180
Committed: http://gitorious.org/mahara/mahara/commit/c61c4423e69fdedb9db041aea8d7e4b4b100a78f
Submitter: Hugh Davenport (hugh@xxxxxxxxxxxxxxx)
Branch: master
commit c61c4423e69fdedb9db041aea8d7e4b4b100a78f
Author: Hugh Davenport <hugh@xxxxxxxxxxxxxxx>
Date: Tue May 1 15:42:18 2012 +1200
Check image file exists in db (bug #992930)
Change-Id: If385b84ed6f026922b68f7bf49d0853383a68354
Signed-off-by: Hugh Davenport <hugh@xxxxxxxxxxxxxxx>
--
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