BUG Class autoloading in i18nTextCollector

The collector didn't find classes marked as entity providers
unless they were already loaded as a sideeffect of the preceding
execution path. Since we want to introspect the whole codebase,
autoloading is mandatory here.
This commit is contained in:
Ingo Schommer 2012-08-06 14:02:47 +02:00
parent d0a9811087
commit 1db830771d

View File

@ -334,7 +334,7 @@ class i18nTextCollector extends Object {
// Not all classes can be instanciated without mandatory arguments,
// so entity collection doesn't work for all SilverStripe classes currently
// Requires PHP 5.1+
if(class_exists($class, false) && in_array('i18nEntityProvider', class_implements($class))) {
if(class_exists($class) && in_array('i18nEntityProvider', class_implements($class))) {
$reflectionClass = new ReflectionClass($class);
if($reflectionClass->isAbstract()) continue;