File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -73,8 +73,14 @@ static public function instance()
73
73
*/
74
74
public static function getVendorRootDir ()
75
75
{
76
- if (isset ($ _SERVER ['MAGE_VENDOR_ROOT ' ])) {
77
- return $ _SERVER ['MAGE_VENDOR_ROOT ' ];
76
+ // Checks for variable if done in Vhosts config.
77
+ if (getenv ('MAGE_VENDOR_ROOT ' )) {
78
+ return getenv ('MAGE_VENDOR_ROOT ' );
79
+ }
80
+
81
+ // Checks for variable if done in .htaccess file.
82
+ if (getenv ('REDIRECT_MAGE_VENDOR_ROOT ' )) {
83
+ return getenv ('REDIRECT_MAGE_VENDOR_ROOT ' );
78
84
}
79
85
80
86
if (defined ('VENDOR_ROOT ' )) {
Original file line number Diff line number Diff line change @@ -38,7 +38,8 @@ public function testRegisterStandard()
38
38
39
39
public function testRegisterWithEnv ()
40
40
{
41
- $ _SERVER ['MAGE_VENDOR_ROOT ' ] = __DIR__ . '/../vendor ' ;
41
+ $ mageVendorRoot = __DIR__ . '/../vendor ' ;
42
+ putenv ("MAGE_VENDOR_ROOT= $ mageVendorRoot " );
42
43
43
44
Varien_Autoload::register ();
44
45
You can’t perform that action at this time.
0 commit comments