Skip to content
This repository
Browse code

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.
  • Loading branch information...
commit 1db830771d9fb234a406e8534b0acd4392264077 1 parent d0a9811
Ingo Schommer authored August 06, 2012

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. 2  i18n/i18nTextCollector.php
2  i18n/i18nTextCollector.php
@@ -334,7 +334,7 @@ function collectFromEntityProviders($filePath) {
334 334
 			// Not all classes can be instanciated without mandatory arguments,
335 335
 			// so entity collection doesn't work for all SilverStripe classes currently
336 336
 			// Requires PHP 5.1+
337  
-			if(class_exists($class, false) && in_array('i18nEntityProvider', class_implements($class))) {
  337
+			if(class_exists($class) && in_array('i18nEntityProvider', class_implements($class))) {
338 338
 				$reflectionClass = new ReflectionClass($class);
339 339
 				if($reflectionClass->isAbstract()) continue;
340 340
 

0 notes on commit 1db8307

Please sign in to comment.
Something went wrong with that request. Please try again.