diff options
Diffstat (limited to 'core/bootstrap.php')
-rw-r--r-- | core/bootstrap.php | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/core/bootstrap.php b/core/bootstrap.php index 546625b8c6..d6e809df20 100644 --- a/core/bootstrap.php +++ b/core/bootstrap.php @@ -22,12 +22,21 @@ disableEaccelerator(); require_once PIWIK_INCLUDE_PATH . '/libs/upgradephp/upgrade.php'; +// Composer autoloader +if (file_exists(PIWIK_INCLUDE_PATH . '/vendor/autoload.php')) { + $path = PIWIK_INCLUDE_PATH . '/vendor/autoload.php'; // Piwik is the main project +} else { + $path = PIWIK_INCLUDE_PATH . '/../../autoload.php'; // Piwik is installed as a dependency +} +require_once $path; + /** - * See https://github.com/piwik/piwik/issues/4439#comment:8 and https://github.com/eaccelerator/eaccelerator/issues/12 - * * Eaccelerator does not support closures and is known to be not comptabile with Piwik. Therefore we are disabling * it automatically. At this point it looks like Eaccelerator is no longer under development and the bug has not * been fixed within a year. + * + * @link https://github.com/piwik/piwik/issues/4439#comment:8 + * @link https://github.com/eaccelerator/eaccelerator/issues/12 */ function disableEaccelerator() { |