mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Merge pull request #6535 from ovidiupruteanu/patch-4
Replace rtrim with preg_replace in SchemaShell
This commit is contained in:
commit
efe82ea148
1 changed files with 2 additions and 2 deletions
|
@ -158,7 +158,7 @@ class SchemaShell extends AppShell {
|
|||
}
|
||||
|
||||
if ($snapshot === true) {
|
||||
$fileName = rtrim($this->params['file'], '.php');
|
||||
$fileName = basename($this->params['file'], '.php');
|
||||
$Folder = new Folder($this->Schema->path);
|
||||
$result = $Folder->read();
|
||||
|
||||
|
@ -285,7 +285,7 @@ class SchemaShell extends AppShell {
|
|||
'connection' => $this->params['connection'],
|
||||
);
|
||||
if (!empty($this->params['snapshot'])) {
|
||||
$fileName = rtrim($this->Schema->file, '.php');
|
||||
$fileName = basename($this->Schema->file, '.php');
|
||||
$options['file'] = $fileName . '_' . $this->params['snapshot'] . '.php';
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue