mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-18 18:46:17 +00:00
Fixing loader loops
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@3388 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
d78ef4d1fe
commit
381ccff146
1 changed files with 8 additions and 6 deletions
|
@ -456,9 +456,10 @@
|
|||
*/
|
||||
function uses() {
|
||||
$args = array_reverse(func_get_args());
|
||||
$i = func_num_args() - 1;
|
||||
while ($i >= 0) {
|
||||
require_once(LIBS . strtolower($args[$i--]) . '.php');
|
||||
$c = func_num_args();
|
||||
|
||||
for ($i = 0; $i < $c; $i++) {
|
||||
require_once(LIBS . strtolower($args[$i]) . '.php');
|
||||
}
|
||||
}
|
||||
/**
|
||||
|
@ -469,9 +470,10 @@
|
|||
*/
|
||||
function vendor($name) {
|
||||
$args = array_reverse(func_get_args());
|
||||
$i = func_num_args() - 1;
|
||||
while ($i >= 0) {
|
||||
$arg = $args[--$i];
|
||||
$c = func_num_args();
|
||||
|
||||
for ($i = 0; $i < $c; $i++) {
|
||||
$arg = $args[$i];
|
||||
if (file_exists(APP . 'vendors' . DS . $arg . '.php')) {
|
||||
require_once(APP . 'vendors' . DS . $arg . '.php');
|
||||
} else {
|
||||
|
|
Loading…
Add table
Reference in a new issue