[php:core] Add cwd param to proc_open (#3281)

This commit is contained in:
Stanimir Stoyanov
2021-06-08 11:52:03 +03:00
committed by GitHub
parent ddc203b2a5
commit f6db283def
2 changed files with 6 additions and 4 deletions
+3 -2
View File
@@ -6356,7 +6356,7 @@ abstract class elFinderVolumeDriver
* @throws elFinderAbortException
* @author Alexey Sukhotin
*/
protected function procExec($command, &$output = '', &$return_var = -1, &$error_output = '')
protected function procExec($command, &$output = '', &$return_var = -1, &$error_output = '', $cwd = null)
{
return elFinder::procExec($command, $output, $return_var, $error_output);
}
@@ -6863,7 +6863,8 @@ abstract class elFinderVolumeDriver
$files = array_map('escapeshellarg', $files);
$cmd = $arc['cmd'] . ' ' . $arc['argc'] . ' ' . escapeshellarg($name) . ' ' . implode(' ', $files);
$this->procExec($cmd, $o, $c);
$err_out = '';
$this->procExec($cmd, $o, $c, $err_out, $dir);
chdir($cwd);
} else {
return false;