[Pkg-owncloud-commits] [owncloud] 12/23: Document why we have to check with defined() first.

David Prévot taffit at moszumanska.debian.org
Tue Jul 22 15:21:35 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository owncloud.

commit 6094da6c76876e3cb891c338c37ed6570fac2031
Author: Andreas Fischer <bantu at owncloud.com>
Date:   Wed Jul 16 15:06:59 2014 +0200

    Document why we have to check with defined() first.
---
 lib/private/db/connectionfactory.php | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/private/db/connectionfactory.php b/lib/private/db/connectionfactory.php
index c132a23..033065b 100644
--- a/lib/private/db/connectionfactory.php
+++ b/lib/private/db/connectionfactory.php
@@ -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,

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list