Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergey Surkov committed Aug 28, 2021
1 parent ac5de03 commit 43b9803
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/Apps/Bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@ public function bootstrap(CoreInterface $app): void
$app['listeners']->add(AppsRoutesRepository::class, function (AppsRoutesRepository $event, AppsRepositoryInterface $appsRepository) {
foreach ($appsRepository->enabled() as $v) {
$provider = $v['routing'] ?? null;
if ($provider && class_exists($provider)) {
if ($provider) {
if(!class_exists($provider)) {
throw new \Exception('Provider ['.$provider.'] class not found!');
}
$event->append(new $provider($v['id'], $v['controllers_namespace']));
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/Core/View/View.php
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ public function fetch($content)

protected function getTemplate()
{
return 'use function ' . __NAMESPACE__ . '\\app,asset,route,css,js,adminRoute,apiRoute;'.PHP_EOL.' ?>' . $this->template;
return 'use function ' . __NAMESPACE__ . '\\{app,asset,route,css,js,adminRoute,apiRoute};'.PHP_EOL.' ?>' . $this->template;
}

public function __toString()
Expand Down

0 comments on commit 43b9803

Please sign in to comment.