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

Commit d1f0f39

Browse files
committed
Update bootstrap
1 parent a8c13d1 commit d1f0f39

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

Bootstrap.php

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,23 @@
66
/*
77
* Smarty PHPUnit Bootstrap
88
*/
9-
// Locate SmartyBC class and load it
9+
// Locate Autoloader or SmartyBC class and load it
1010
if (is_file(__DIR__ . '/../smarty/libs/Autoloader.php')) {
1111
require_once __DIR__ . '/../smarty/libs/Autoloader.php';
12+
Smarty_Autoloader::register(true);
1213
} elseif (is_file(__DIR__ . '/../libs/Autoloader.php')) {
1314
require_once __DIR__ . '/../libs/Autoloader.php';
15+
Smarty_Autoloader::register(true);
16+
} elseif (is_file(__DIR__ . '/../smarty/libs/SmartyBC.class.php')) {
17+
require_once __DIR__ . '/../smarty/libs/SmartyBC.class.php';
18+
} elseif (is_file(__DIR__ . '/../libs/SmartyBC.class.php')) {
19+
require_once __DIR__ . '/../libs/SmartyBC.class.php';
1420
} else {
1521
throw new Exception('can not locate Smarty distribution');
1622
}
17-
Smarty_Autoloader::register(true);
1823
if (!defined('SMARTY_COMPOSER_INSTALL')) {
19-
foreach (array(__DIR__ . '/../../autoload.php', __DIR__ . '/../vendor/autoload.php', __DIR__ . '/vendor/autoload.php') as $file) {
24+
foreach (array(__DIR__ . '/../../autoload.php', __DIR__ . '/../vendor/autoload.php',
25+
__DIR__ . '/vendor/autoload.php') as $file) {
2026
if (file_exists($file)) {
2127
define('SMARTY_COMPOSER_INSTALL', $file);
2228
break;

0 commit comments

Comments
 (0)