Skip to content

Commit

Permalink
Error thrown on non-whitelisted object than can't be cast to string n…
Browse files Browse the repository at this point in the history
…ow a SPL RuntimeException.
  • Loading branch information
Jelmer Schreuder committed May 25, 2011
1 parent 9b13c76 commit e3bf025
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion classes/security.php
Expand Up @@ -175,7 +175,7 @@ public static function htmlentities($value)
// Throw exception when it wasn't whitelisted and can't be converted to String // Throw exception when it wasn't whitelisted and can't be converted to String
if ( ! method_exists($value, '__toString')) if ( ! method_exists($value, '__toString'))
{ {
throw new \Fuel_Exception('Object class "'.get_class($value).'" could not be converted to string or '. throw new \RuntimeException('Object class "'.get_class($value).'" could not be converted to string or '.
'sanitized as ArrayAcces. Whitelist it in security.whitelisted_classes in app/config/config.php '. 'sanitized as ArrayAcces. Whitelist it in security.whitelisted_classes in app/config/config.php '.
'to allow it to be passed unchecked.'); 'to allow it to be passed unchecked.');
} }
Expand Down

0 comments on commit e3bf025

Please sign in to comment.