git.cweiske.de
/
shpub.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0a7989a
)
Handle space after "-x" option.
author
Christian Weiske
<cweiske@cweiske.de>
Thu, 1 Feb 2018 10:12:31 +0000
(11:12 +0100)
committer
Christian Weiske
<cweiske@cweiske.de>
Thu, 1 Feb 2018 10:12:31 +0000
(11:12 +0100)
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
patch
|
blob
|
history
diff --git
a/src/shpub/Command/AbstractProps.php
b/src/shpub/Command/AbstractProps.php
index e186819f49b26a907660a50854f87c028f9ee06f..c893eef3dbdbac8eb9930cf70cb0dc3ea6b02ce8 100644
(file)
--- 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] = [];