@@ -48,8 +48,9 @@ |
||
| 48 | 48 | $difference[$key] = $value; |
| 49 | 49 | } else { |
| 50 | 50 | $new_diff = $this->array_diff_assoc_recursive($value, $array2[$key]); |
| 51 | - if (!empty($new_diff)) |
|
| 52 | - $difference[$key] = $new_diff; |
|
| 51 | + if (!empty($new_diff)) { |
|
| 52 | + $difference[$key] = $new_diff; |
|
| 53 | + } |
|
| 53 | 54 | } |
| 54 | 55 | } else if (!array_key_exists($key, $array2) || $array2[$key] !== $value) { |
| 55 | 56 | $difference[$key] = $value; |
@@ -31,6 +31,9 @@ |
||
| 31 | 31 | static::executeCommand($event, $consoleDir, 'rabbitmq:vhost:define '.$vhost, $options['process-timeout']); |
| 32 | 32 | } |
| 33 | 33 | |
| 34 | + /** |
|
| 35 | + * @param string $cmd |
|
| 36 | + */ |
|
| 34 | 37 | protected static function executeCommand(CommandEvent $event, $consoleDir, $cmd, $timeout = 300) |
| 35 | 38 | { |
| 36 | 39 | $php = escapeshellarg(static::getPhp(false)); |
@@ -41,7 +41,7 @@ |
||
| 41 | 41 | } |
| 42 | 42 | |
| 43 | 43 | $process = new Process($php.($phpArgs ? ' '.$phpArgs : '').' '.$console.' '.$cmd, null, null, null, $timeout); |
| 44 | - $process->run(function ($type, $buffer) use ($event) { $event->getIO()->write($buffer, false); }); |
|
| 44 | + $process->run(function($type, $buffer) use ($event) { $event->getIO()->write($buffer, false); }); |
|
| 45 | 45 | if (!$process->isSuccessful()) { |
| 46 | 46 | throw new \RuntimeException(sprintf("An error occurred when executing the \"%s\" command:\n\n%s\n\n%s.", escapeshellarg($cmd), $process->getOutput(), $process->getErrorOutput())); |
| 47 | 47 | } |