mirror of
https://github.com/e107inc/e107.git
synced 2025-08-08 07:36:32 +02:00
Extra error display info
This commit is contained in:
@@ -11,8 +11,8 @@
|
|||||||
| GNU General Public License (http://gnu.org).
|
| GNU General Public License (http://gnu.org).
|
||||||
|
|
|
|
||||||
| $Source: /cvs_backup/e107_0.8/e107_handlers/resize_handler.php,v $
|
| $Source: /cvs_backup/e107_0.8/e107_handlers/resize_handler.php,v $
|
||||||
| $Revision: 1.10 $
|
| $Revision: 1.11 $
|
||||||
| $Date: 2009-04-23 20:23:42 $
|
| $Date: 2009-09-19 20:46:08 $
|
||||||
| $Author: e107steved $
|
| $Author: e107steved $
|
||||||
|
|
|
|
||||||
|
|
|
|
||||||
@@ -228,6 +228,7 @@ function resize_image($source_file, $destination_file, $type = "upload", $model
|
|||||||
{
|
{
|
||||||
case 'png' :
|
case 'png' :
|
||||||
if (!imagepng($dst_img, $destName, 6)) { $returnError = -1; } // Fix the quality for now
|
if (!imagepng($dst_img, $destName, 6)) { $returnError = -1; } // Fix the quality for now
|
||||||
|
$outputFunc = 'imagepng';
|
||||||
break;
|
break;
|
||||||
case 'gif' :
|
case 'gif' :
|
||||||
if (!imagegif($dst_img, $destName)) { $returnError = -1; }
|
if (!imagegif($dst_img, $destName)) { $returnError = -1; }
|
||||||
@@ -239,7 +240,8 @@ function resize_image($source_file, $destination_file, $type = "upload", $model
|
|||||||
$outputFunc = 'imagejpeg';
|
$outputFunc = 'imagejpeg';
|
||||||
break;
|
break;
|
||||||
default :
|
default :
|
||||||
$returnError = -7; // Invalid output extensiot
|
$returnError = -7; // Invalid output extension
|
||||||
|
$outputFunc = 'none';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -247,7 +249,7 @@ function resize_image($source_file, $destination_file, $type = "upload", $model
|
|||||||
if (!imagedestroy($dst_img)) { $returnError = -3; }
|
if (!imagedestroy($dst_img)) { $returnError = -3; }
|
||||||
if ($returnError)
|
if ($returnError)
|
||||||
{
|
{
|
||||||
echo "Resizing error (2): {$returnError}<br />";
|
echo "Resizing error (2): {$returnError} - {$outputFunc} -> {$destName}<br />";
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
Reference in New Issue
Block a user