Form: Fix translation domain detection while running unit tests
This commit is contained in:
parent
6e61980dd2
commit
ff263946c8
|
@ -1071,10 +1071,11 @@ class Form extends Zend_Form
|
|||
protected function getTranslationDomain()
|
||||
{
|
||||
$parts = explode('\\', get_called_class());
|
||||
if ($parts[1] === 'Module') {
|
||||
if (count($parts) > 1 && $parts[1] === 'Module') {
|
||||
// Assume format Icinga\Module\ModuleName\Forms\...
|
||||
return strtolower($parts[2]);
|
||||
}
|
||||
|
||||
return 'icinga';
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue