Skip to content
Snippets Groups Projects
Commit 09a5b61f authored by gweissbach's avatar gweissbach
Browse files

fetch.php file not existing and devision by zero

If the cache file does not exist after it should have been generated via an action
plugin or via resizing filemtime fails with a file not found. This has to be fixed
by @filemtime.

Another fix is the check for the $INFO before resizing an image in get_resized.
get_croped has already been fixed

darcs-hash:20080805132309-f4337-41698af01cf1f3632bd68e1e10724bdffc7c58a3.gz
parent 3a50618c
No related branches found
No related tags found
No related merge requests found
......@@ -100,7 +100,7 @@
*/
function sendFile($file,$mime,$cache){
global $conf;
$fmtime = filemtime($file);
$fmtime = @filemtime($file);
// send headers
header("Content-Type: $mime");
// smart http caching headers
......@@ -212,7 +212,9 @@ function http_rangeRequest($size){
function get_resized($file, $ext, $w, $h=0){
global $conf;
$info = getimagesize($file);
$info = @getimagesize($file); //get original size
if($info == false) return $file; // that's no image - it's a spaceship!
if(!$h) $h = round(($w * $info[1]) / $info[0]);
// we wont scale up to infinity
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment