Permalink
Browse files

Merge branch 'hotfix/ZF2-202' of https://github.com/rhunwicks/zf2 int…

…o feature/db-story-41
  • Loading branch information...
2 parents 49d956f + 55b65d9 commit 7916a70bd7e4a5e124154226134ba300be6368c5 @ralphschindler ralphschindler committed Mar 26, 2012
Showing with 6 additions and 2 deletions.
  1. +6 −2 library/Zend/Db/Adapter/Driver/Pdo/Connection.php
@@ -111,9 +111,13 @@ public function getDefaultSchema()
/** @var $result \PDOStatement */
$result = $this->resource->query('SELECT DATABASE()');
- $r = $result->fetch_row();
- return $r[0];
+ if ($result instanceof \PDOStatement) {
+ $r = $result->fetch_row();
+ return $r[0];
+ }
+ return false;
}
+
/**
* Set resource
*

0 comments on commit 7916a70

Please sign in to comment.