Fixed crash when executing command /version with multiple authors declared in 'author' (#3940)

closes #3902
This commit is contained in:
DerDevHD 2020-12-01 16:47:55 +01:00 committed by GitHub
parent 215bac8dd7
commit bac986d0b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -156,7 +156,11 @@ class PluginDescription{
}
$this->authors = [];
if(isset($plugin["author"])){
$this->authors[] = $plugin["author"];
if(is_array($plugin["author"])){
$this->authors = $plugin["author"];
}else{
$this->authors[] = $plugin["author"];
}
}
if(isset($plugin["authors"])){
foreach($plugin["authors"] as $author){