Fixed Phrases translating

Jumuro

Well-known member
Affected version
2.0.0 Beta 4
In admin.php?phrases/search
Click button Translate
Code:
An exception occurred: [ArgumentCountError] Too few arguments to function XF\Admin\Controller\Phrase::getPhraseSearchFinder(), 1 passed in /var/www/src/XF/Admin/Controller/Phrase.php on line 363 and exactly 2 expected in src/XF/Admin/Controller/Phrase.php on line 251
XF\Admin\Controller\Phrase->getPhraseSearchFinder() in src/XF/Admin/Controller/Phrase.php at line 363
XF\Admin\Controller\Phrase->actionTranslation() in src/XF/Mvc/Dispatcher.php at line 249
XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 88
XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 41
XF\Mvc\Dispatcher->run() in src/XF/App.php at line 1787
XF\App->run() in src/XF.php at line 326
XF::runApp() in admin.php at line 13
 
Fixed this for the next release.

If you'd like to fix it yourself, edit the file src/XF/Admin/Controller/Phrase.php and change:
PHP:
protected function getPhraseSearchFinder(\XF\Entity\Language $language, array &$linkParams)
To:
PHP:
protected function getPhraseSearchFinder(\XF\Entity\Language $language, array &$linkParams = [])
 
Top Bottom