1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-02-05 14:54:03 +00:00

Use array_key_exists instead of null check

This commit is contained in:
lukinovec 2022-11-02 13:48:08 +01:00
parent 1eaefc01c1
commit 2796a10b52

View file

@ -40,7 +40,7 @@ class MailTenancyBootstrapper implements TenancyBootstrapper
foreach (static::$credentialsMap as $configKey => $storageKey) { foreach (static::$credentialsMap as $configKey => $storageKey) {
$override = $tenant->$storageKey; $override = $tenant->$storageKey;
if (! is_null($override)) { if (array_key_exists($storageKey, $tenant->getAttributes())) {
$this->originalConfig[$configKey] ??= $this->config->get($configKey); $this->originalConfig[$configKey] ??= $this->config->get($configKey);
$this->config->set($configKey, $override); $this->config->set($configKey, $override);