fix: Make sure array_combine returns an array

This commit is contained in:
Pierre Rudloff 2019-06-17 23:19:18 +02:00
parent c232522429
commit dcf65cadb0
1 changed files with 3 additions and 1 deletions

View File

@ -177,7 +177,9 @@ class Config
{ {
$keys = array_keys($this->genericFormats); $keys = array_keys($this->genericFormats);
$keys[array_search($oldFormat, $keys)] = $newFormat; $keys[array_search($oldFormat, $keys)] = $newFormat;
$this->genericFormats = array_combine($keys, $this->genericFormats); if ($genericFormats = array_combine($keys, $this->genericFormats)) {
$this->genericFormats = $genericFormats;
}
} }
/** /**