projects
/
civicrm-core.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Only load autoload.php from local vendor directory if it exists
[civicrm-core.git]
/
CRM
/
Core
/
ClassLoader.php
diff --git
a/CRM/Core/ClassLoader.php
b/CRM/Core/ClassLoader.php
index 9bbcd0fbb5c5e7aaf93ba0301652d75cf086932d..17aa8eb3e441fcc83b345574545397f5d951a930 100644
(file)
--- a/
CRM/Core/ClassLoader.php
+++ b/
CRM/Core/ClassLoader.php
@@
-3,7
+3,7
@@
+--------------------------------------------------------------------+
| CiviCRM version 4.7 |
+--------------------------------------------------------------------+
+--------------------------------------------------------------------+
| CiviCRM version 4.7 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-201
6
|
+ | Copyright CiviCRM LLC (c) 2004-201
7
|
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
@@
-29,7
+29,7
@@
*
*
* @package CRM
*
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-201
6
+ * @copyright CiviCRM LLC (c) 2004-201
7
* $Id$
*
*/
* $Id$
*
*/
@@
-103,8
+103,11
@@
class CRM_Core_ClassLoader {
return;
}
$civicrm_base_path = dirname(dirname(__DIR__));
return;
}
$civicrm_base_path = dirname(dirname(__DIR__));
+ $composer_autoload = "$civicrm_base_path/vendor/autoload.php";
- require_once dirname(dirname(__DIR__)) . '/vendor/autoload.php';
+ if (file_exists($composer_autoload)) {
+ require_once $composer_autoload;
+ }
// we do this to prevent a autoloader errors with joomla / 3rd party packages
// use absolute path since we dont know the content of include_path as yet
// we do this to prevent a autoloader errors with joomla / 3rd party packages
// use absolute path since we dont know the content of include_path as yet
@@
-123,7
+126,10
@@
class CRM_Core_ClassLoader {
);
$include_paths = implode(PATH_SEPARATOR, $include_paths);
set_include_path($include_paths . PATH_SEPARATOR . get_include_path());
);
$include_paths = implode(PATH_SEPARATOR, $include_paths);
set_include_path($include_paths . PATH_SEPARATOR . get_include_path());
- require_once "$civicrm_base_path/vendor/autoload.php";
+ // @todo Why do we need to load this again?
+ if (file_exists($composer_autoload)) {
+ require_once $composer_autoload;
+ }
}
/**
}
/**