git.cweiske.de
/
phancap.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e68a775
)
Allow empty parameter values
author
Christian Weiske
<cweiske@cweiske.de>
Wed, 29 Jun 2016 19:31:21 +0000
(21:31 +0200)
committer
Christian Weiske
<cweiske@cweiske.de>
Wed, 29 Jun 2016 19:31:21 +0000
(21:31 +0200)
src/phancap/Options.php
patch
|
blob
|
history
diff --git
a/src/phancap/Options.php
b/src/phancap/Options.php
index 061230cf5f0b533e244dec0f3e1a061f61ae7e1d..d39af73218fafc31009f53db328a9f865ec33622 100644
(file)
--- a/
src/phancap/Options.php
+++ b/
src/phancap/Options.php
@@
-144,7
+144,11
@@
class Options
continue;
}
- if ($arOption['type'] == 'url') {
+ if ($arValues[$name] === ''
+ && !isset($arOption['required'])
+ ) {
+ //allow empty value; default value will be used
+ } else if ($arOption['type'] == 'url') {
$this->values[$name] = $this->validateUrl($arValues[$name]);
} else if ($arOption['type'] == 'int') {
$this->values[$name] = $this->validateInt(