Skip to content

Commit e19040a

Browse files
authored
Allow autoloader to detect trait_exists() (#394)
Fixes #374
1 parent 53d5634 commit e19040a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

source/CAS/Autoload.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,12 +68,12 @@ function CAS_autoload($class)
6868
);
6969
$trace = $e->getTrace();
7070
if (isset($trace[2]) && isset($trace[2]['function'])
71-
&& in_array($trace[2]['function'], array('class_exists', 'interface_exists'))
71+
&& in_array($trace[2]['function'], array('class_exists', 'interface_exists', 'trait_exists'))
7272
) {
7373
return false;
7474
}
7575
if (isset($trace[1]) && isset($trace[1]['function'])
76-
&& in_array($trace[1]['function'], array('class_exists', 'interface_exists'))
76+
&& in_array($trace[1]['function'], array('class_exists', 'interface_exists', 'trait_exists'))
7777
) {
7878
return false;
7979
}

0 commit comments

Comments
 (0)