From afec87fc377ef8bafec4b7588084cca91468bd68 Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Thu, 1 Feb 2018 11:12:31 +0100 Subject: [PATCH] Handle space after "-x" option. Normally you do "-xfoo=bar", but some people try to do "-x foo=bar" which caused strange issues. Resolves: https://github.com/cweiske/shpub/issues/11 --- src/shpub/Command/AbstractProps.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/shpub/Command/AbstractProps.php b/src/shpub/Command/AbstractProps.php index e186819..c893eef 100644 --- a/src/shpub/Command/AbstractProps.php +++ b/src/shpub/Command/AbstractProps.php @@ -188,6 +188,10 @@ class Command_AbstractProps if (count($cmdRes->options['x'])) { $postParams = []; foreach ($cmdRes->options['x'] as $xproperty) { + if ($xproperty == '') { + //happens with "-x foo=bar" instead of "-xfoo=bar" + continue; + } list($propkey, $propval) = explode('=', $xproperty, 2); if (!isset($postParams[$propkey])) { $postParams[$propkey] = []; -- 2.30.2