Skip to content

Commit

Permalink
Merge branch 'main' into next
Browse files Browse the repository at this point in the history
  • Loading branch information
fballiano committed May 2, 2023
2 parents 210aa81 + d3dcc76 commit 78bd803
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions app/Mage.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,14 @@
Varien_Autoload::register();

/** AUTOLOADER PATCH **/
if (file_exists($autoloaderPath = (getenv('COMPOSER_VENDOR_PATH') ?: BP . DS . 'vendor') . DS . 'autoload.php')) {
require $autoloaderPath;
$autoloaderPath = getenv('COMPOSER_VENDOR_PATH');
if (!$autoloaderPath) {
$autoloaderPath = dirname(BP) . DS . 'vendor';
if (!is_dir($autoloaderPath)) {
$autoloaderPath = BP . DS . 'vendor';
}
}
require $autoloaderPath . DS . 'autoload.php';
/** AUTOLOADER PATCH **/

/* Support additional includes, such as composer's vendor/autoload.php files */
Expand Down

0 comments on commit 78bd803

Please # to comment.