Remove warning in CLI usage
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1365 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
3
cli.php
3
cli.php
@@ -199,6 +199,7 @@ class cli
|
|||||||
$keyStdIn = reset ($tab);
|
$keyStdIn = reset ($tab);
|
||||||
$dataStdIn = file_get_contents ("php://stdin");
|
$dataStdIn = file_get_contents ("php://stdin");
|
||||||
$argv[$keyStdIn] = $dataStdIn;
|
$argv[$keyStdIn] = $dataStdIn;
|
||||||
|
unset ($keyStdIn);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Convert "toto=ror&ypyp=oo" arg to array("toto"=>"ror","ypyp"=>"oo")
|
// Convert "toto=ror&ypyp=oo" arg to array("toto"=>"ror","ypyp"=>"oo")
|
||||||
@@ -206,7 +207,7 @@ class cli
|
|||||||
foreach ($argv as $key=>$arg)
|
foreach ($argv as $key=>$arg)
|
||||||
{
|
{
|
||||||
// Don't modify the stdin
|
// Don't modify the stdin
|
||||||
if ($key === $keyStdIn)
|
if (isset ($keyStdIn) && $key === $keyStdIn)
|
||||||
continue;
|
continue;
|
||||||
$pairs = explode('&', $arg);
|
$pairs = explode('&', $arg);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user