aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIvan Enderlin <ivan.enderlin@hoa-project.net>2013-07-12 15:44:10 +0200
committerIvan Enderlin <ivan.enderlin@hoa-project.net>2013-07-12 15:44:10 +0200
commit8606e66ca51e1a61b042b39ed5166e85a3582079 (patch)
treeeae585bf9b619a86dcc7dc3021d7b2e625f6f2c3
parent602656024a91e5092ebcaba7657e0ea66300a4e6 (diff)
downloadRouter-8606e66ca51e1a61b042b39ed5166e85a3582079.zip
Router-8606e66ca51e1a61b042b39ed5166e85a3582079.tar.gz
Router-8606e66ca51e1a61b042b39ed5166e85a3582079.tar.bz2
Add a constraint when interpreting $argv.
Before, if an entry in $argv contains a “=”, it was considered as an option/switch. It could lead to an error when an input contains a “=” symbol. We add a constraint to fix this.
-rw-r--r--Cli.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/Cli.php b/Cli.php
index 895779d..82980db 100644
--- a/Cli.php
+++ b/Cli.php
@@ -351,7 +351,7 @@ class Cli extends Generic implements \Hoa\Core\Parameter\Parameterizable {
foreach($_argv as $arg) {
- if(false !== strpos($arg, '=')) {
+ if('-' === $arg[0] && false !== strpos($arg, '=')) {
if(false !== strpos($arg, '"'))
$arg = str_replace(