diff --git a/app/Services/Eggs/EggConfigurationService.php b/app/Services/Eggs/EggConfigurationService.php index 3b3ca2d1..597f6761 100644 --- a/app/Services/Eggs/EggConfigurationService.php +++ b/app/Services/Eggs/EggConfigurationService.php @@ -98,6 +98,16 @@ class EggConfigurationService // Normalize the output of the configuration for the new Wings Daemon to more // easily ingest, as well as make things more flexible down the road. foreach ($configs as $file => $data) { + // Try to head off any errors relating to parsing a set of configuration files + // or other JSON data for the egg. This should probably be blocked at the time + // of egg creation/update, but it isn't so this check will at least prevent a + // 500 error which would crash the entire Wings boot process. + // + // @see https://github.com/pterodactyl/panel/issues/3055 + if (!is_object($data) || !isset($data->find)) { + continue; + } + $append = array_merge((array) $data, ['file' => $file, 'replace' => []]); foreach ($this->iterate($data->find, $structure) as $find => $replace) {