PoDatabaseWriter::importString() calls locale_string_is_safe(), but does not ensure that the function is actually available.
The function is defined in locale.inc which in turn gets included on demand, or during a full bootstrap via locale_init.

Steps to (hopefully) reproduce:

  1. Define an update hook that enables a module via module_enable() (in our case, fast_token_browser)
  2. Run drush updb

Proposed solution:

Require includes/locale.inc either at the top of PoDatabaseWriter at include time, or at call time in importStrings.

Comments

ciss created an issue. See original summary.

ciss’s picture

Title: locale_string_is_safe may be undefined in PoDatabaseWriter::importString() » locale_string_is_safe() may be undefined in PoDatabaseWriter::importString()