Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save thewisenerd/b7db34b5e8bf2f36f283f208ff096b4b to your computer and use it in GitHub Desktop.
Save thewisenerd/b7db34b5e8bf2f36f283f208ff096b4b to your computer and use it in GitHub Desktop.
From 517aff265ef68bcd81476dde501ed3157c45d437 Mon Sep 17 00:00:00 2001
From: thewisenerd <[email protected]>
Date: Fri, 17 Jun 2016 08:44:25 +0530
Subject: [PATCH] illuminate/database: add hotfix for multiple query select
---
vendor/illuminate/database/Connection.php | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/vendor/illuminate/database/Connection.php b/vendor/illuminate/database/Connection.php
index 30b8557..fc765a3 100755
--- a/vendor/illuminate/database/Connection.php
+++ b/vendor/illuminate/database/Connection.php
@@ -336,9 +336,15 @@ class Connection implements ConnectionInterface
$fetchArgument = $me->getFetchArgument();
- return isset($fetchArgument) ?
- $statement->fetchAll($me->getFetchMode(), $fetchArgument, $me->getFetchConstructorArgument()) :
- $statement->fetchAll($me->getFetchMode());
+ do {
+ $ret = isset($fetchArgument) ?
+ $statement->fetchAll($me->getFetchMode(), $fetchArgument, $me->getFetchConstructorArgument()) :
+ $statement->fetchAll($me->getFetchMode());
+ if (count($ret)) {
+ return $ret;
+ }
+ } while ($statement->nextRowset());
+ return array();
});
}
--
2.8.3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment