Skip to content

Commit

Permalink
Fix compatibility with Nette 2.4
Browse files Browse the repository at this point in the history
[Closes #106]
  • Loading branch information
enumag authored and fprochazka committed Apr 19, 2016
1 parent 78f84ec commit b0517f9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Kdyby/Translation/DI/TranslationExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ protected function validateResource($format, $file, $locale, $domain)

try {
$def = $builder->getDefinition($this->loaders[$format]);
$refl = Reflection\ClassType::from($def->factory ? $def->factory->entity : $def->class);
$refl = Reflection\ClassType::from($def->getEntity() ?: $def->getClass());
if (($method = $refl->getConstructor()) && $method->getNumberOfRequiredParameters() > 1) {
return;
}
Expand All @@ -438,7 +438,7 @@ protected function validateResource($format, $file, $locale, $domain)

public function afterCompile(Code\ClassType $class)
{
$initialize = $class->methods['initialize'];
$initialize = $class->getMethod('initialize');
if (class_exists('Tracy\Debugger')) {
$initialize->addBody('Kdyby\Translation\Diagnostics\Panel::registerBluescreen();');
}
Expand Down

0 comments on commit b0517f9

Please sign in to comment.