Skip to content
This repository was archived by the owner on Jan 1, 2020. It is now read-only.

Commit 67cbbbf

Browse files
committed
Merge pull request #253 from samsonasik/autoload-checkmoved
move class_exists(ZendLoaderAutoloaderFactory) before $zf2Path check based on #248
2 parents 443a0b8 + 62ade7c commit 67cbbbf

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

init_autoloader.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@
2121
$loader = include 'vendor/autoload.php';
2222
}
2323

24+
if (class_exists('Zend\Loader\AutoloaderFactory')) {
25+
return;
26+
}
27+
2428
$zf2Path = false;
2529

2630
if (is_dir('vendor/ZF2/library')) {
@@ -31,7 +35,7 @@
3135
$zf2Path = get_cfg_var('zf2_path');
3236
}
3337

34-
if ($zf2Path && !class_exists('Zend\Loader\AutoloaderFactory')) {
38+
if ($zf2Path) {
3539
if (isset($loader)) {
3640
$loader->add('Zend', $zf2Path);
3741
$loader->add('ZendXml', $zf2Path);

0 commit comments

Comments
 (0)