diff --git a/Classes/Sitegeist/MagicWand/Command/AbstractCommandController.php b/Classes/Sitegeist/MagicWand/Command/AbstractCommandController.php index 374d050..f20ae5a 100644 --- a/Classes/Sitegeist/MagicWand/Command/AbstractCommandController.php +++ b/Classes/Sitegeist/MagicWand/Command/AbstractCommandController.php @@ -56,7 +56,7 @@ protected function executeLocalShellCommand($command, $arguments = [], $options $this->outputLine($customizedCommand); } $customizedCommandResult = shell_exec($customizedCommand); - if (!in_array(self::HIDE_RESULT, $options)) { + if (is_string($customizedCommandResult) && !in_array(self::HIDE_RESULT, $options)) { $this->outputLine($customizedCommandResult); } return $customizedCommandResult; diff --git a/Classes/Sitegeist/MagicWand/Command/CloneCommandController.php b/Classes/Sitegeist/MagicWand/Command/CloneCommandController.php index c7a17b0..b37591a 100644 --- a/Classes/Sitegeist/MagicWand/Command/CloneCommandController.php +++ b/Classes/Sitegeist/MagicWand/Command/CloneCommandController.php @@ -305,6 +305,14 @@ public function remoteHostCommand( $this->outputHeadLine('Clear Caches'); $this->executeLocalFlowCommand('flow:cache:flush'); + ################## + # Set DB charset # + ################## + if ($this->databaseConfiguration['driver'] == 'pdo_mysql' && $remotePersistenceConfiguration['charset'] != 'utf8mb4') { + $this->outputHeadLine('Set DB charset'); + $this->executeLocalFlowCommand('database:setcharset'); + } + ############## # Migrate DB # ############## @@ -358,7 +366,9 @@ protected function checkConfiguration($remotePersistenceConfiguration) $this->outputLine(' only mysql is supported'); $this->quit(1); } - if ($remotePersistenceConfiguration['charset'] != $this->databaseConfiguration['charset']) { + if (in_array($remotePersistenceConfiguration['charset'], ['utf8','utf8mb4']) && in_array($this->databaseConfiguration['charset'], ['utf8','utf8mb4'])) { + // we accept utf8 and utf8mb4 beeing similar enough + } else if ($remotePersistenceConfiguration['charset'] != $this->databaseConfiguration['charset']) { $this->outputLine(' the databases have to use the same charset'); $this->quit(1); }