Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

BUGFIX Fixed arguments in global _t() function, added check for $retu…

…rnValue fallback that its not the injection array as second parameter
  • Loading branch information...
commit 431b9589b6d49b1ce147724625a02cb9e32e7809 1 parent 0597e91
@chillu chillu authored
Showing with 3 additions and 3 deletions.
  1. +2 −2 core/Core.php
  2. +1 −1  i18n/i18n.php
View
4 core/Core.php
@@ -386,8 +386,8 @@ function stripslashes_recursively(&$array) {
/**
* @see i18n::_t()
*/
-function _t($entity, $string = "", $context = "") {
- return i18n::_t($entity, $string, $context);
+function _t($entity, $string = "", $context = "", $injection = "") {
+ return i18n::_t($entity, $string, $context, $injection);
}
/**
View
2  i18n/i18n.php
@@ -1488,7 +1488,7 @@ static function _t($entity, $string = "", $context = "", $injection = "") {
$translatorsByPrio = self::$translators;
if(!$translatorsByPrio) $translatorsByPrio = self::get_translators();
- $returnValue = $string; // Fall back to default string argument
+ $returnValue = (is_string($string)) ? $string : ''; // Fall back to default string argument
foreach($translatorsByPrio as $priority => $translators) {
foreach($translators as $name => $translator) {
Please sign in to comment.
Something went wrong with that request. Please try again.