Update index.php

Comments about error coming from setting PHP Directive Display Errors to ON
Initializing arg1, arg2, ...arg9 ='' may be useful to avoid this problem when calling the API from a script
Error logic may break when you get this notifies on the response
This commit is contained in:
Estratos Consulting 2014-07-24 05:46:08 -06:00
commit 2828dfc870

View file

@ -26,6 +26,9 @@ if (isset($_POST['user']) || isset($_POST['hash'])) {
echo 'Error: only admin is allowed to use API'; echo 'Error: only admin is allowed to use API';
exit; exit;
} }
// Not Declaring arguments may cause Notifies on the response on an API Call when the Directive Dysplay errors is enabled
// you may initialize argument arg1, arg2,... arg9 to = '' here
// Or post the unused args to =''
// Prepare arguments // Prepare arguments
if (isset($_POST['cmd'])) $cmd = escapeshellarg($_POST['cmd']); if (isset($_POST['cmd'])) $cmd = escapeshellarg($_POST['cmd']);