]> source.dussan.org Git - nextcloud-server.git/commitdiff
Document why we have to check with defined() first.
authorAndreas Fischer <bantu@owncloud.com>
Wed, 16 Jul 2014 13:06:59 +0000 (15:06 +0200)
committerAndreas Fischer <bantu@owncloud.com>
Wed, 16 Jul 2014 13:13:35 +0000 (15:13 +0200)
lib/private/db/connectionfactory.php

index c132a2321cdab2ae1caaa3a5b7f15d56b9481187..033065bcb77cab1c08c19c38f807357743f191af 100644 (file)
@@ -61,6 +61,8 @@ class ConnectionFactory {
                        throw new \InvalidArgumentException("Unsupported type: $type");
                }
                $result = $this->defaultConnectionParams[$normalizedType];
+               // \PDO::MYSQL_ATTR_FOUND_ROWS may not be defined, e.g. when the MySQL
+               // driver is missing. In this case, we won't be able to connect anyway.
                if ($normalizedType === 'mysql' && defined('\PDO::MYSQL_ATTR_FOUND_ROWS')) {
                        $result['driverOptions'] = array(
                                \PDO::MYSQL_ATTR_FOUND_ROWS => true,