Remove a str_split() from the previous commit - we can access string characters like we do in an indexed array anyways
diff --git a/system/libraries/Image_lib.php b/system/libraries/Image_lib.php
index d4fb519..72621c9 100644
--- a/system/libraries/Image_lib.php
+++ b/system/libraries/Image_lib.php
@@ -171,15 +171,7 @@
{
if ($val != '' AND preg_match('/^#?([0-9a-f]{3}|[0-9a-f]{6})$/i', $val, $matches))
{
- if (strlen($matches[1]) === 6)
- {
- $val = '#'.$val;
- }
- else
- {
- $val = str_split($val, 1);
- $val = '#'.$val[0].$val[0].$val[1].$val[1].$val[2].$val[2];
- }
+ $val = (strlen($matches[1]) === 6) ? '#'.$val : '#'.$val[0].$val[0].$val[1].$val[1].$val[2].$val[2];
}
else
{