[ci skip] Validate width, height config values
diff --git a/system/libraries/Image_lib.php b/system/libraries/Image_lib.php
index f594b71..edd1337 100644
--- a/system/libraries/Image_lib.php
+++ b/system/libraries/Image_lib.php
@@ -456,7 +456,7 @@
 			{
 				if (property_exists($this, $key))
 				{
-					if (in_array($key, array('wm_font_color', 'wm_shadow_color')))
+					if (in_array($key, array('wm_font_color', 'wm_shadow_color'), TRUE))
 					{
 						if (preg_match('/^#?([0-9a-f]{3}|[0-9a-f]{6})$/i', $val, $matches))
 						{
@@ -478,6 +478,10 @@
 							continue;
 						}
 					}
+					elseif (in_array($key, array('width', 'height'), TRUE) && ! ctype_digit((string) $val))
+					{
+						continue;
+					}
 
 					$this->$key = $val;
 				}