- // ignore change when extension does not provide translation structure
- if (file_exists($lang_path))
- $_SESSION['get_text']->add_domain($_SESSION['language']->code,
+ // ignore change when extension does not provide translation structure and test for valid gettext.
+ if (file_exists($lang_path) && isset($GetText))
+ $GetText->add_domain($_SESSION['language']->code,