Skip to content

Commit

Permalink
Allow module without Helper/HelperFactory (joomla#40017)
Browse files Browse the repository at this point in the history
  • Loading branch information
joomdonation authored Mar 10, 2023
1 parent 15dfdfb commit e1c9bf3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion libraries/src/Extension/Module.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class Module implements ModuleInterface, HelperFactoryInterface
*
* @since 4.0.0
*/
public function __construct(ModuleDispatcherFactoryInterface $dispatcherFactory, HelperFactoryInterface $helperFactory)
public function __construct(ModuleDispatcherFactoryInterface $dispatcherFactory, ?HelperFactoryInterface $helperFactory)
{
$this->dispatcherFactory = $dispatcherFactory;
$this->helperFactory = $helperFactory;
Expand Down
2 changes: 1 addition & 1 deletion libraries/src/Extension/Service/Provider/Module.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public function register(Container $container)
function (Container $container) {
return new \Joomla\CMS\Extension\Module(
$container->get(ModuleDispatcherFactoryInterface::class),
$container->get(HelperFactoryInterface::class)
$container->has(HelperFactoryInterface::class) ? $container->get(HelperFactoryInterface::class) : null
);
}
);
Expand Down

0 comments on commit e1c9bf3

Please sign in to comment.