From 0672c8f83f068c546454bacefac123b5acb508cc Mon Sep 17 00:00:00 2001 From: Chad Parry Date: Thu, 21 Jul 2011 01:12:26 -0600 Subject: Polishing the rawphoto changes, including adding some tests. Squashed commit of the following: commit 945316a8c220b12adb687c896bcc5e86f99f46a4 Author: Chad Parry Date: Thu Jul 21 01:11:13 2011 -0600 Add a test for the sunny-day scenario where a rule changes a data file's MIME type. commit 4ee1ee000c8f4d8ebaae66f637bc71080486fd73 Author: Chad Parry Date: Thu Jul 21 00:49:47 2011 -0600 Ensure that a third-party cannot swap out a legitimate photo with an unsafe file type. commit 7dd0105bfc59c150e5640e693778f51bbaa44eab Author: Chad Parry Date: Thu Jul 21 00:48:19 2011 -0600 Update the MIME type and other meta-data when a new data file is provided. commit 5a8844c7947b21cf658f22cc61f20ffa9e8f07f2 Author: Chad Parry Date: Thu Jul 21 00:30:01 2011 -0600 Remove a unit test that no longer applies. Replacement data files are allowed to have different MIME types. commit 0de9c6283ce4f5773cad8e92b6785d6a1f7b5e46 Author: Chad Parry Date: Thu Jul 21 00:27:45 2011 -0600 If one rule fails, then abort processing, rather than trying to proceed to subsequent rules. commit 41d379c2b777ae7b3a11f528971228e234f8976f Author: Chad Parry Date: Thu Jul 21 00:10:10 2011 -0600 Replace an overly-complicated regular expression with a simple in_array, at Bharat's suggestion. commit 1b3f7111d4c2607baaa2da0aab3b501f2d9a1426 Merge: 8f7904a 403f64b Author: Chad Parry Date: Wed Jul 20 21:02:56 2011 -0600 Merge branch 'master' into rawphoto commit 8f7904ab62c71a7e4ee68762f936030b4dcb4ea1 Merge: e950573 771de0a Author: Chad Parry Date: Sat Jun 25 14:12:39 2011 -0600 Merge branches 'master' and 'rawphoto' into rawphoto commit e95057337996351e49915d9f85d007d50103a4be Author: Chad Parry Date: Wed Jun 15 20:24:18 2011 -0600 Merge branches 'rawphoto-squash' and 'rawphoto' into rawphoto --- modules/gallery/helpers/graphics.php | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'modules/gallery/helpers/graphics.php') diff --git a/modules/gallery/helpers/graphics.php b/modules/gallery/helpers/graphics.php index 39c87fbd..3548faa1 100644 --- a/modules/gallery/helpers/graphics.php +++ b/modules/gallery/helpers/graphics.php @@ -170,14 +170,8 @@ class graphics_Core { foreach (self::_get_rules($target) as $rule) { $args = array($working_file, $output_file, unserialize($rule->args), $item); - try { - call_user_func_array($rule->operation, $args); - $working_file = $output_file; - } catch (Exception $e) { - // Ignore this rule and move on. - Kohana_Log::add("error", "Caught exception processing image: {$item->title}\n" . - $e->getMessage() . "\n" . $e->getTraceAsString()); - } + call_user_func_array($rule->operation, $args); + $working_file = $output_file; } } -- cgit v1.2.3