Author: caefer
Date: 2010-03-23 16:46:15 +0100 (Tue, 23 Mar 2010)
New Revision: 28718
Modified:
plugins/sfImageTransformExtraPlugin/trunk/lib/transforms/sfImageAlphaMaskGD.class.php
Log:
prepareParameters() can now throw an InvalidArgumentException
Modified:
plugins/sfImageTransformExtraPlugin/trunk/lib/transforms/sfImageAlphaMaskGD.class.php
===================================================================
---
plugins/sfImageTransformExtraPlugin/trunk/lib/transforms/sfImageAlphaMaskGD.class.php
2010-03-23 15:45:33 UTC (rev 28717)
+++
plugins/sfImageTransformExtraPlugin/trunk/lib/transforms/sfImageAlphaMaskGD.class.php
2010-03-23 15:46:15 UTC (rev 28718)
@@ -95,6 +95,7 @@
*
* This callback adds the resources path to a mask image
*
+ * @throws InvalidArgumentException
* @param sfImage $sourceImage The original image
* @param array $parameters Configured parameters for this transformation
* @return array $parameters Extended/altered parameters
@@ -117,6 +118,11 @@
{
$parameters['mask'] = new sfImage($plugin_resources_dir . '/' .
$parameters['mask']);
}
+ else
+ {
+ throw new InvalidArgumentException('Mask "'.$parameters['mask'].'" could
not be found!');
+ }
+
return $parameters;
}
}
--
You received this message because you are subscribed to the Google Groups
"symfony SVN" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/symfony-svn?hl=en.