fix/add SAPI checks to prevent execution via webserver

This commit is contained in:
Daniel Reichelt
2016-06-19 23:43:42 +02:00
parent 6df08f6b9a
commit 1e8bc553b8
2 changed files with 6 additions and 4 deletions

View File

@@ -16,6 +16,11 @@
*
*/
// Check if we're in the CLI
if(@php_sapi_name() !== 'cli') {
die('This script will only work in the shell.');
}
// give control to command line handler
try {
CmdLineHandler::processParameters($argc, $argv);