Skip to content

Commit

Permalink
FilesystemIterator doesn't have the isDot method!?
Browse files Browse the repository at this point in the history
  • Loading branch information
mbabker committed Dec 8, 2014
1 parent ab788e2 commit 6f78602
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ function move_mautic_core(array $status)
/** @var FilesystemIterator $file */
foreach ($iterator as $file) {
// Sanity checks
if (!$file->isDot() && $file->isFile()) {
if ($file->isFile()) {
$src = $file->getPath() . '/' . $file->getFilename();
$dest = str_replace(MAUTIC_UPGRADE_ROOT, MAUTIC_ROOT, $src);

Expand All @@ -316,7 +316,7 @@ function move_mautic_core(array $status)
/** @var FilesystemIterator $file */
foreach ($iterator as $file) {
// Sanity checks
if (!$file->isDot() && $file->isFile()) {
if ($file->isFile()) {
$src = $file->getPath() . '/' . $file->getFilename();
$dest = str_replace(MAUTIC_UPGRADE_ROOT, MAUTIC_ROOT, $src);

Expand All @@ -341,7 +341,7 @@ function move_mautic_core(array $status)
/** @var FilesystemIterator $file */
foreach ($iterator as $file) {
// Sanity checks
if (!$file->isDot() && $file->isFile()) {
if ($file->isFile()) {
$src = $file->getPath() . '/' . $file->getFilename();
$dest = str_replace(MAUTIC_UPGRADE_ROOT, MAUTIC_ROOT, $src);

Expand Down Expand Up @@ -439,7 +439,7 @@ function move_mautic_core(array $status)
/** @var FilesystemIterator $file */
foreach ($iterator as $file) {
// Sanity checks
if (!$file->isDot() && $file->isFile() && !in_array($file->getFilename(), array('deleted_files.txt', 'upgrade.php'))) {
if ($file->isFile() && !in_array($file->getFilename(), array('deleted_files.txt', 'upgrade.php'))) {
$src = $file->getPath() . '/' . $file->getFilename();
$dest = str_replace(MAUTIC_UPGRADE_ROOT, MAUTIC_ROOT, $src);

Expand Down Expand Up @@ -520,6 +520,9 @@ function move_mautic_vendors(array $status)
$src = $directory->getPath() . '/' . $directory->getFilename();
$dest = str_replace(MAUTIC_UPGRADE_ROOT, MAUTIC_ROOT, $src);

// We'll need to completely remove the existing vendor first
recursive_remove_directory($dest);

$result = copy_directory($src, $dest);

if ($result !== true) {
Expand Down Expand Up @@ -589,6 +592,9 @@ function move_mautic_vendors(array $status)
$src = $directory->getPath() . '/' . $directory->getFilename();
$dest = str_replace(MAUTIC_UPGRADE_ROOT, MAUTIC_ROOT, $src);

// We'll need to completely remove the existing vendor first
recursive_remove_directory($dest);

$result = copy_directory($src, $dest);

if ($result !== true) {
Expand Down

0 comments on commit 6f78602

Please sign in to comment.