Skip to content

Commit 2828dfc

Browse files
committed
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
1 parent 179cca9 commit 2828dfc

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

web/api/index.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,10 @@
2626
echo 'Error: only admin is allowed to use API';
2727
exit;
2828
}
29-
29+
// Not Declaring arguments may cause Notifies on the response on an API Call when the Directive Dysplay errors is enabled
30+
// you may initialize argument arg1, arg2,... arg9 to = '' here
31+
// Or post the unused args to =''
32+
3033
// Prepare arguments
3134
if (isset($_POST['cmd'])) $cmd = escapeshellarg($_POST['cmd']);
3235
if (isset($_POST['arg1'])) $arg1 = escapeshellarg($_POST['arg1']);

0 commit comments

Comments
 (0)