• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Fixed Problems with elasticsearch after upgrading

Garamond

Well-known member
#1
I get a whole lot of these after the last upgrade:

ErrorException: Fatal Error: syntax error, unexpected '[' - library/XenES/Model/Elasticsearch.php:221

What is happening here?

Stack trace:
#0 [internal function]: XenForo_Application::handleFatalError()
#1 {main}
 

Mike

XenForo developer
Staff member
#2
Ahh that was a mistake on my end. I accidentally used a PHP 5.4 syntax. In library/XenES/Model/Elasticsearch.php, you can fix it by changing:
Code:
$mappings = [];
to:
Code:
$mappings = array();
I'd strongly recommend that you upgrade your PHP version if possible though.