diff --git a/lib/SimpleSAML/Database.php b/lib/SimpleSAML/Database.php index 8e267790efcf3c27eaf5e1ae608a45ccb9608300..01bd51eea20a2d12033d550b1882c27d04bad2f0 100644 --- a/lib/SimpleSAML/Database.php +++ b/lib/SimpleSAML/Database.php @@ -86,7 +86,7 @@ class Database { $driverOptions = $config->getArray('database.driver_options', []); if ($config->getBoolean('database.persistent', true)) { - $driverOptions = [PDO::ATTR_PERSISTENT => true]; + $driverOptions[PDO::ATTR_PERSISTENT] = true; } // connect to the primary @@ -136,7 +136,7 @@ class Database 'database.username' => $config->getString('database.username', null), 'database.password' => $config->getString('database.password', null), 'database.prefix' => $config->getString('database.prefix', ''), - 'database.persistent' => $config->getBoolean('database.persistent', false), + 'database.persistent' => $config->getBoolean('database.persistent', true), ], // TODO: deprecated: the "database.slave" terminology is preserved here for backwards compatibility. 'secondaries' => $config->getArray('database.secondaries', $config->getArray('database.slaves', [])), diff --git a/lib/SimpleSAML/Metadata/SAMLBuilder.php b/lib/SimpleSAML/Metadata/SAMLBuilder.php index 91f39443aba43db0560f9841d32da09b468ad29b..f0f96a0a31acd96e21fb110f124b868ed6bf7784 100644 --- a/lib/SimpleSAML/Metadata/SAMLBuilder.php +++ b/lib/SimpleSAML/Metadata/SAMLBuilder.php @@ -681,10 +681,15 @@ class SAMLBuilder * @param \SAML2\XML\md\RoleDescriptor $rd The RoleDescriptor the certificate should be added to. * @param string $use The value of the 'use' attribute. * @param string $x509data The certificate data. - * @param string|null $keyName The name of the key. Should be valid for usage in an ID attribute, e.g. not start with a digit. + * @param string|null $keyName The name of the key. Should be valid for usage in an ID attribute, + * e.g. not start with a digit. */ - private function addX509KeyDescriptor(RoleDescriptor $rd, string $use, string $x509data, ?string $keyName = null): void - { + private function addX509KeyDescriptor( + RoleDescriptor $rd, + string $use, + string $x509data, + ?string $keyName = null + ): void { Assert::oneOf($use, ['encryption', 'signing']); $keyDescriptor = \SAML2\Utils::createKeyDescriptor($x509data, $keyName);