mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 02:56:15 +00:00
Removing duplicate variable assignment.
This commit is contained in:
parent
b39b38aac9
commit
0d37beca75
1 changed files with 0 additions and 1 deletions
|
@ -236,7 +236,6 @@ class ProjectTask extends Shell {
|
|||
$File =& new File($path . 'webroot' . DS . 'test.php');
|
||||
$contents = $File->read();
|
||||
if (preg_match('/([\\t\\x20]*define\\(\\\'CAKE_CORE_INCLUDE_PATH\\\',[\\t\\x20\'A-z0-9]*\\);)/', $contents, $match)) {
|
||||
$root = strpos(CAKE_CORE_INCLUDE_PATH, '/') === 0 ? " DS . '" : "'";
|
||||
$result = str_replace($match[0], "\t\tdefine('CAKE_CORE_INCLUDE_PATH', " . $root . str_replace(DS, "' . DS . '", trim(CAKE_CORE_INCLUDE_PATH, DS)) . "');", $contents);
|
||||
if (!$File->write($result)) {
|
||||
return false;
|
||||
|
|
Loading…
Add table
Reference in a new issue