]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/webcolor.php
Throw an WebColorException if wrong # of hex chars
[quix0rs-gnu-social.git] / lib / webcolor.php
index 65713d26ef7e695821a2faa94c47e9b4ffd54761..aaf31d990363921d3036a3878cd683fcd200557a 100644 (file)
@@ -120,7 +120,8 @@ class WebColor {
                                      $hexcolor[1].$hexcolor[1],
                                      $hexcolor[2].$hexcolor[2]);
         } else {
-            return false;
+            $errmsg = _('%s is not a valid color! Use 3 or 6 hex chars.');
+            throw new WebColorException(sprintf($errmsg, $hexcolor));
         }
 
         $this->red   = hexdec($r);