mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-09-06 11:32:40 +00:00
Dots appear in the text searched for, added to search pattern.
The define statement in skel/webroot/index.php contains dots. Added \. to the search pattern so that bake will update the core path in webroot/index.php
This commit is contained in:
parent
f645db61fb
commit
dc85d21f05
1 changed files with 1 additions and 1 deletions
|
@ -282,7 +282,7 @@ class ProjectTask extends Shell {
|
|||
if (dirname($path) !== CAKE_CORE_INCLUDE_PATH) {
|
||||
$File = new File($path . 'webroot' . DS . 'index.php');
|
||||
$contents = $File->read();
|
||||
if (preg_match('/([\s]*define\(\'CAKE_CORE_INCLUDE_PATH\',[\s\'A-z0-9]*\);)/', $contents, $match)) {
|
||||
if (preg_match('/([\s]*define\(\'CAKE_CORE_INCLUDE_PATH\',[\s\'A-z0-9\.]*\);)/', $contents, $match)) {
|
||||
$root = strpos(CAKE_CORE_INCLUDE_PATH, '/') === 0 ? " DS . '" : "'";
|
||||
$result = str_replace($match[0], "\n\t\tdefine('CAKE_CORE_INCLUDE_PATH', " . $root . str_replace(DS, "' . DS . '", trim(CAKE_CORE_INCLUDE_PATH, DS)) . "');", $contents);
|
||||
if (!$File->write($result)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue