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

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;
}
} }
/** /**