mirror of
https://github.com/serghey-rodin/vesta.git
synced 2025-08-21 05:44:07 -07:00
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:
parent
179cca9566
commit
2828dfc870
1 changed files with 4 additions and 1 deletions
|
@ -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']);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue