From: Zach Copley Date: Thu, 10 Mar 2011 18:08:14 +0000 (+0000) Subject: Show a reasonable error message when an image is bad, instead of X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=a984aae56499466220b25c43c24637273005f4d7;p=quix0rs-gnu-social.git Show a reasonable error message when an image is bad, instead of letting the exception continue bubbling up. --- diff --git a/actions/newapplication.php b/actions/newapplication.php index eb13593536..657c7bcb71 100644 --- a/actions/newapplication.php +++ b/actions/newapplication.php @@ -22,7 +22,7 @@ * @category Applications * @package StatusNet * @author Zach Copley - * @copyright 2008-2009 StatusNet, Inc. + * @copyright 2008-2011 StatusNet, Inc. * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 * @link http://status.net/ */ @@ -290,7 +290,13 @@ class NewApplicationAction extends OwnerDesignAction $app->query('ROLLBACK'); } - $app->uploadLogo(); + try { + $app->uploadLogo(); + } catch (Exception $e) { + $app->query('ROLLBACK'); + $this->showForm(_('Invalid image.')); + return; + } $app->query('COMMIT');