diff options
Diffstat (limited to 'lib/Minz')
| -rw-r--r-- | lib/Minz/Configuration.php | 4 | ||||
| -rw-r--r-- | lib/Minz/ModelPdo.php | 5 |
2 files changed, 3 insertions, 6 deletions
diff --git a/lib/Minz/Configuration.php b/lib/Minz/Configuration.php index 45988f4a9..bb4a8b09e 100644 --- a/lib/Minz/Configuration.php +++ b/lib/Minz/Configuration.php @@ -4,8 +4,8 @@ declare(strict_types=1); /** * Manage configuration for the application. * @property string $base_url - * @property array{'type':string,'host':string,'user':string,'password':string,'base':string,'prefix':string, - * 'connection_uri_params':string,'pdo_options':array<int,int|string|bool>} $db + * @property array{type:'mysql'|'pgsql'|'sqlite',host:string,user:string,password:string,base:string,prefix:string, + * connection_uri_params:string,pdo_options:array<int,int|string|bool>} $db * @property bool $disable_update * @property string $environment * @property array<string,bool> $extensions_enabled diff --git a/lib/Minz/ModelPdo.php b/lib/Minz/ModelPdo.php index cb541a1e4..e481911bc 100644 --- a/lib/Minz/ModelPdo.php +++ b/lib/Minz/ModelPdo.php @@ -82,10 +82,7 @@ class Minz_ModelPdo { $this->pdo->setPrefix($db['prefix'] . $this->current_user . '_'); break; default: - throw new Minz_PDOConnectionException( - 'Invalid database type!', - $db['user'], Minz_Exception::ERROR - ); + throw new Minz_PDOConnectionException('Invalid database type!', is_string($db['user'] ?? null) ? $db['user'] : '', Minz_Exception::ERROR); } if (self::$usesSharedPdo) { self::$sharedPdo = $this->pdo; |
