From 60894db8dc547ab97fb14a75613fcb0f81bd268d Mon Sep 17 00:00:00 2001 From: Steve Kamerman Date: Sat, 18 May 2013 23:33:39 -0400 Subject: [PATCH] Syntax changes --- PHPCI/Plugin/Mysql.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/PHPCI/Plugin/Mysql.php b/PHPCI/Plugin/Mysql.php index 589617ab..41f99aa2 100644 --- a/PHPCI/Plugin/Mysql.php +++ b/PHPCI/Plugin/Mysql.php @@ -72,9 +72,9 @@ class Mysql implements \PHPCI\Plugin if (!is_array($query)) { // Simple query $this->pdo->query($query); - } else { + } else if (isset($query['import'])) { // SQL file execution - $this->executeFile($query); + $this->executeFile($query['import']); } } } catch (\Exception $ex) { @@ -87,11 +87,11 @@ class Mysql implements \PHPCI\Plugin protected function executeFile($query) { - if (!isset($query['import'])) { - throw new \Exception("Import statement must contiain an 'import' key"); + if (!isset($query['file'])) { + throw new \Exception("Import statement must contiain an 'file' key"); } - $import_file = $query['import']; + $import_file = $query['file']; if (!is_readable($import_file)) { throw new \Exception("Cannot open SQL import file"); }