From 2b835716b67c8070e70437e5e644bb3b81734aee Mon Sep 17 00:00:00 2001 From: Mark Friedrich Date: Mon, 4 Nov 2019 20:53:01 +0100 Subject: [PATCH] - Fixed PHP 7.1 compatibility, closed #863 --- app/main/model/universe/systemmodel.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/main/model/universe/systemmodel.php b/app/main/model/universe/systemmodel.php index 39f41672..c59ca342 100644 --- a/app/main/model/universe/systemmodel.php +++ b/app/main/model/universe/systemmodel.php @@ -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);