- Affected version
- 2.2.12
\XF\Entity\Phrase
PHP:
public function getPhraseGroup($new = true)
{
$title = $new ? $this->getValue('title') : $this->getExistingValue('title');
if (!$title || !preg_match('/^([a-z0-9_]+)\./i', $title, $match))
{
return null;
}
...
XF\Service\Phrase\Rebuild
PHP:
protected function _rebuildPhraseMap($id, array $map, array $phraseList)
{
...
$parts = explode('.', $title);
\XF\Language
PHP:
public function getPhraseText($name)
{
...
$parts = explode('.', $name, 2);
The first two likely should match the 3rd. ie explode with a limit of 2.
getPhraseGroup
also has the issue with dealing with a falsy title. The phrase title 0.foo
will be regarded as non-grouped when the entity is about to save the phrase but will be considered grouped when trying to use it.