From a0a5cade285305d67a98ac7ad8ede86746055728 Mon Sep 17 00:00:00 2001 From: Dominique Fournier Date: Wed, 28 May 2014 14:19:09 +0000 Subject: [PATCH] Remove warning in CLI usage git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1365 bf3deb0d-5f1a-0410-827f-c0cc1f45334c --- cli.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cli.php b/cli.php index f71378c..9abe279 100644 --- a/cli.php +++ b/cli.php @@ -199,6 +199,7 @@ class cli $keyStdIn = reset ($tab); $dataStdIn = file_get_contents ("php://stdin"); $argv[$keyStdIn] = $dataStdIn; + unset ($keyStdIn); } // Convert "toto=ror&ypyp=oo" arg to array("toto"=>"ror","ypyp"=>"oo") @@ -206,7 +207,7 @@ class cli foreach ($argv as $key=>$arg) { // Don't modify the stdin - if ($key === $keyStdIn) + if (isset ($keyStdIn) && $key === $keyStdIn) continue; $pairs = explode('&', $arg);