- Fixed PHP 7.1 compatibility, closed #863

This commit is contained in:
Mark Friedrich
2019-11-04 20:53:01 +01:00
parent c32a7478e7
commit 2b835716b6

View File

@@ -143,7 +143,7 @@ class SystemModel extends AbstractUniverseModel {
// 'Shattered' systems have ONLY planets named with '(shattered)'
// -> system 'Thera' has '(shattered)' AND other planets -> not shattered.
// -> system 'J164104, 'J115422' - the only non-shattered wormholes which have a shattered planet -> not shattered.
$data->shattered = count(array_filter($planetsData, function(object $planetData){
$data->shattered = count(array_filter($planetsData, function($planetData){
return property_exists($planetData, 'type') &&
(strpos(strtolower($planetData->type->name), '(shattered)') !== false);
})) == count($planetsData);