diff --git a/RedBeanPHP/Driver/RPDO.php b/RedBeanPHP/Driver/RPDO.php index 48210946..165a8c92 100644 --- a/RedBeanPHP/Driver/RPDO.php +++ b/RedBeanPHP/Driver/RPDO.php @@ -161,7 +161,7 @@ protected function bindParams( $statement, $bindings ) * @return mixed * @throws SQL */ - protected function runQuery( $sql, $bindings, $options = array() ) + public function runQuery( $sql, $bindings, $options = array() ) { $this->connect(); if ( $this->loggingEnabled && $this->logger ) { @@ -181,12 +181,12 @@ protected function runQuery( $sql, $bindings, $options = array() ) $statement->execute(); $this->queryCounter ++; $this->affectedRows = $statement->rowCount(); + if ( isset( $options['noFetch'] ) && $options['noFetch'] ) { + $this->resultArray = array(); + return $statement; + } if ( $statement->columnCount() ) { $fetchStyle = ( isset( $options['fetchStyle'] ) ) ? $options['fetchStyle'] : NULL; - if ( isset( $options['noFetch'] ) && $options['noFetch'] ) { - $this->resultArray = array(); - return $statement; - } if ( is_null( $fetchStyle) ) { $this->resultArray = $statement->fetchAll(); } else { diff --git a/testing/RedUNIT/Base/Fuse.php b/testing/RedUNIT/Base/Fuse.php index c36c9dda..d6d6fde8 100644 --- a/testing/RedUNIT/Base/Fuse.php +++ b/testing/RedUNIT/Base/Fuse.php @@ -205,8 +205,10 @@ public function testFactory() /** * Make sure that beans of type book_page can be fused with * models like BookPage (beautified) as well as Book_Page (non-beautified). + * + * @return void */ - public function testBeutificationOfLinkModel() + public function testBeautificationOfLinkModel() { $page = R::dispense( 'page' ); $widget = R::dispense( 'widget' ); diff --git a/testing/RedUNIT/Mysql/Writer.php b/testing/RedUNIT/Mysql/Writer.php index 5f59740f..5a23878e 100644 --- a/testing/RedUNIT/Mysql/Writer.php +++ b/testing/RedUNIT/Mysql/Writer.php @@ -248,8 +248,8 @@ public function testSetGetJSON() */ public function testFunctionFilters() { - global $travis; - if ($travis) return; + if (strpos(R::getCell('select version()'), '10.3.9-MariaDB') === FALSE) + return; R::nuke(); R::bindFunc( 'read', 'location.point', 'asText' ); R::bindFunc( 'write', 'location.point', 'GeomFromText' );