Skip to content

Commit

Permalink
Merge pull request #145 from Quetzacoalt91/check-file-exists
Browse files Browse the repository at this point in the history
Check bootstrap.php before require
  • Loading branch information
Quetzacoalt91 authored Aug 21, 2018
2 parents 99b0dfd + 46b363b commit 7260ef5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion classes/TaskRunner/Rollback/RestoreDb.php
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,8 @@ public function init()
$this->container->initPrestaShopAutoloader();

// Loads the parameters.php file on PrestaShop 1.7, needed for accessing the database
require_once $this->container->getProperty(UpgradeContainer::PS_ROOT_PATH).'/config/bootstrap.php';
if (file_exists($this->container->getProperty(UpgradeContainer::PS_ROOT_PATH).'/config/bootstrap.php')) {
require_once $this->container->getProperty(UpgradeContainer::PS_ROOT_PATH).'/config/bootstrap.php';
}
}
}

0 comments on commit 7260ef5

Please sign in to comment.