diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2007-01-07 20:35:49 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2007-01-07 20:35:49 +0000 |
commit | b6cfe134badb2d4393e9081b13b2dfca011ed736 (patch) | |
tree | 4f6213e626fa90b4b280b5e663e791559c4a7f8f /lib/ui.lib.php | |
parent | 90d2acbc54b24b6e8207e12f1cabcbc7541ca447 (diff) | |
download | ampache-b6cfe134badb2d4393e9081b13b2dfca011ed736.tar.gz ampache-b6cfe134badb2d4393e9081b13b2dfca011ed736.tar.bz2 ampache-b6cfe134badb2d4393e9081b13b2dfca011ed736.zip |
* Re-worked Main page of Ampache, adding Album of the moment.
* Moved stats to /stats.php page
* Fixed logic error in resize that could cause nothign to display
if resize was on, but it still failed
* Fixed Upload Album art from Find Album Art
* Added Menu to the TV page
* Fixed logic error that showed localplay if user had access
regardless of global config
* Changed default action of browse.php to song browse
Diffstat (limited to 'lib/ui.lib.php')
-rw-r--r-- | lib/ui.lib.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/ui.lib.php b/lib/ui.lib.php index af9bca40..bc87289f 100644 --- a/lib/ui.lib.php +++ b/lib/ui.lib.php @@ -619,6 +619,9 @@ function img_resize($image,$size,$type){ } $src = imagecreatefromstring($image); + + if (!$src) { return false; } + $width = imagesx($src); $height = imagesy($src); @@ -626,7 +629,10 @@ function img_resize($image,$size,$type){ $new_h = $size['height']; $img = imagecreatetruecolor($new_w,$new_h); - imagecopyresampled($img,$src,0,0,0,0,$new_w,$new_h,$width,$height); + + if (!imagecopyresampled($img,$src,0,0,0,0,$new_w,$new_h,$width,$height)) { + return false; + } // determine image type and send it to the client switch ($type) { |