From 6da84014cffe95d73458434358e3eabac8bbeece Mon Sep 17 00:00:00 2001 From: Jordan Doyle Date: Thu, 27 Oct 2016 00:28:36 +0100 Subject: [PATCH] more wp/laravel compatibility tweaks --- src/Proxy/WordpressDatabase.php | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/Proxy/WordpressDatabase.php b/src/Proxy/WordpressDatabase.php index af5e14d..1a9b3a9 100644 --- a/src/Proxy/WordpressDatabase.php +++ b/src/Proxy/WordpressDatabase.php @@ -36,6 +36,18 @@ class WordpressDatabase extends wpdb } /** + * Laravel handles all the connection handling for us including reconnecting + * so we'll just pretend we're always connected to whatever is calling us. + * + * @param bool $allow_bail + * @return bool + */ + public function check_connection($allow_bail = true) + { + return true; + } + + /** * Set the properties Wordpress expects so it will run queries for us * through this class. * @@ -127,11 +139,10 @@ class WordpressDatabase extends wpdb * @since 0.71 * * @param string $query Database query - * @param bool $skipCache * * @return false|int Number of rows affected/selected or false on error */ - public function query($query, $skipCache = false) + public function query($query) { if (!$this->ready) { $this->check_current_query = true; -- libgit2 1.7.2