mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 02:56:15 +00:00
Adding extra protection to cake console be executed in driver root (windows).
This commit is contained in:
parent
1f2afd8d3f
commit
c5f291958b
1 changed files with 4 additions and 1 deletions
|
@ -263,7 +263,10 @@ class ShellDispatcher {
|
||||||
}
|
}
|
||||||
|
|
||||||
$params['app'] = basename($params['app']);
|
$params['app'] = basename($params['app']);
|
||||||
$params['working'] = rtrim($params['root'], '/') . '/' . $params['app'];
|
$params['working'] = rtrim($params['root'], '/');
|
||||||
|
if (!$isWin || !preg_match('/^[A-Z]:$/i', $params['app'])) {
|
||||||
|
$params['working'] .= '/' . $params['app'];
|
||||||
|
}
|
||||||
|
|
||||||
if (!empty($matches[0]) || !empty($isWin)) {
|
if (!empty($matches[0]) || !empty($isWin)) {
|
||||||
$params = str_replace('/', '\\', $params);
|
$params = str_replace('/', '\\', $params);
|
||||||
|
|
Loading…
Add table
Reference in a new issue