Allow non-string values to be used as captcha words (issue #2215)
diff --git a/system/helpers/captcha_helper.php b/system/helpers/captcha_helper.php
index 8378332..78e255a 100644
--- a/system/helpers/captcha_helper.php
+++ b/system/helpers/captcha_helper.php
@@ -93,7 +93,7 @@
 		// Do we have a "word" yet?
 		// -----------------------------------
 
-		if ($word === '')
+		if (empty($word))
 		{
 			$pool = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
 			$word = '';
@@ -102,6 +102,10 @@
 				$word .= $pool[mt_rand(0, $mt_rand_max)];
 			}
 		}
+		elseif ( ! is_string($word))
+		{
+			$word = (string) $word;
+		}
 
 		// -----------------------------------
 		// Determine angle and position