Print error from CLI scripts when system/exec function is disabled (#5744)

pull/5755/head
Aleksander Machniak 8 years ago
parent 0b595fa401
commit 5b741abed7

@ -4,6 +4,7 @@ CHANGELOG Roundcube Webmail
- Update to TinyMCE 4.5.7
- Fix bug where invalid recipients could be silently discarded (#5739)
- Fix conflict with _gid cookie of Google Analytics (#5748)
- Print error from CLI scripts when system/exec function is disabled (#5744)
RELEASE 1.3-rc
--------------

@ -23,6 +23,10 @@ define('INSTALL_PATH', realpath(__DIR__ . '/..') . '/' );
require_once INSTALL_PATH . 'program/include/clisetup.php';
if (!function_exists('exec')) {
die("PHP exec() function is required. Check disable_functions in php.ini\n");
}
$SOURCES = json_decode(file_get_contents(INSTALL_PATH . 'jsdeps.json'), true);
if (empty($SOURCES['dependencies'])) {
@ -319,4 +323,3 @@ foreach ($SOURCES['dependencies'] as $package) {
echo "Done.\n\n";
}

@ -23,6 +23,10 @@ define('INSTALL_PATH', realpath(__DIR__ . '/..') . '/' );
require_once INSTALL_PATH . 'program/include/clisetup.php';
if (!function_exists('system')) {
rcube::raise_error("PHP system() function is required. Check disable_functions in php.ini.", false, true);
}
$target_dir = unslashify($_SERVER['argv'][1]);
if (empty($target_dir) || !is_dir(realpath($target_dir)))

Loading…
Cancel
Save