Fix: [ bug #1471 ] Several PHP warnings when intercepting USER_CREATE
trigger (Add a protection to avoid multiple errors).
This commit is contained in:
parent
a2724822d7
commit
2dc3e5b104
@ -345,6 +345,8 @@ class Translate
|
|||||||
{
|
{
|
||||||
global $db;
|
global $db;
|
||||||
|
|
||||||
|
if (! is_string($key)) return 'ErrorBadValueForParamNotAString'; // Avoid multiple errors with code not using function correctly.
|
||||||
|
|
||||||
//print 'xx'.$key;
|
//print 'xx'.$key;
|
||||||
$newstr=$key;
|
$newstr=$key;
|
||||||
if (preg_match('/^Currency([A-Z][A-Z][A-Z])$/i',$key,$reg))
|
if (preg_match('/^Currency([A-Z][A-Z][A-Z])$/i',$key,$reg))
|
||||||
@ -659,7 +661,7 @@ class Translate
|
|||||||
|
|
||||||
//print 'param: '.$key.'-'.$keydatabase.'-'.$this->trans($key); exit;
|
//print 'param: '.$key.'-'.$keydatabase.'-'.$this->trans($key); exit;
|
||||||
|
|
||||||
// Check if in language array (this can call getTradFromKey)
|
// Check if a translation is available (this can call getTradFromKey)
|
||||||
if ($this->transnoentitiesnoconv($key) != $key)
|
if ($this->transnoentitiesnoconv($key) != $key)
|
||||||
{
|
{
|
||||||
return $this->transnoentitiesnoconv($key); // Found in language array
|
return $this->transnoentitiesnoconv($key); // Found in language array
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user