summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--system/libraries/Form_validation.php13
1 files changed, 3 insertions, 10 deletions
diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php
index f0c1500df..df57f80ff 100644
--- a/system/libraries/Form_validation.php
+++ b/system/libraries/Form_validation.php
@@ -691,20 +691,13 @@ class CI_Form_validation {
if (substr($fieldname, 0, 5) == 'lang:')
{
// Grab the variable
- $line = substr($fieldname, 5);
-
- // Translate it
- $fieldname = $this->CI->lang->line($line);
+ $line = substr($fieldname, 5);
- // Were we able to translate the field name?
- if ($fieldname === FALSE)
+ // Were we able to translate the field name? If not we use $line
+ if (FALSE === ($fieldname = $this->CI->lang->line($line)))
{
return $line;
}
- else
- {
- return $fieldname;
- }
}
return $fieldname;