Skip to content

Commit

Permalink
No commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
maartenvanvliet committed Feb 16, 2008
1 parent 8965027 commit fa6000e
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions MY_Forge.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
class Forge extends Forge_Core {
public function error_message($func,$args)
{

// Force args to be an array
$args = is_array($args) ? $args : array();

// Add the label or name to the beginning of the args
array_unshift($args, $this->label ? strtolower($this->label) : $this->name);
if(!is_array($args))
{
$args=array($args);
}

if (isset($this->error_messages[$func]))
{
Expand All @@ -19,6 +19,7 @@ public function error_message($func,$args)
{
// Fetch an i18n error message
$error = Kohana::lang('validation.'.$func, $args);

}

return $error;
Expand Down

0 comments on commit fa6000e

Please sign in to comment.