Created
June 17, 2016 03:24
-
-
Save thewisenerd/b7db34b5e8bf2f36f283f208ff096b4b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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