mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 17:16:18 +00:00
Merge pull request #4078 from dereuromark/master-bake
Fix project baking
This commit is contained in:
commit
d6733e3ad1
1 changed files with 2 additions and 2 deletions
|
@ -237,8 +237,8 @@ class ProjectTask extends AppShell {
|
||||||
$File = new File($path . 'Console' . DS . 'cake.php');
|
$File = new File($path . 'Console' . DS . 'cake.php');
|
||||||
$contents = $File->read();
|
$contents = $File->read();
|
||||||
if (preg_match('/(__CAKE_PATH__)/', $contents, $match)) {
|
if (preg_match('/(__CAKE_PATH__)/', $contents, $match)) {
|
||||||
$root = strpos(CAKE_CORE_INCLUDE_PATH, '/') === 0 ? " \$ds . '" : "'";
|
$root = strpos(CAKE_CORE_INCLUDE_PATH, '/') === 0 ? " DS . '" : "'";
|
||||||
$replacement = $root . str_replace(DS, "' . \$ds . '", trim(CAKE_CORE_INCLUDE_PATH, DS)) . "'";
|
$replacement = $root . str_replace(DS, "' . DS . '", trim(CAKE_CORE_INCLUDE_PATH, DS)) . "'";
|
||||||
$result = str_replace($match[0], $replacement, $contents);
|
$result = str_replace($match[0], $replacement, $contents);
|
||||||
if ($File->write($result)) {
|
if ($File->write($result)) {
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Add table
Reference in a new issue