Skip to content

Commit

Permalink
set CLIBootstrap dispatch to match with parent method
Browse files Browse the repository at this point in the history
  • Loading branch information
kpicaza committed Jul 28, 2020
1 parent 25ac361 commit a4a43a8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Sifo/CLBootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,17 @@ public static function execute( $instance_name = null, $controller_name = null,
*
* @param string $controller Dispatches a specific controller. Defaults to null for compatibility with Bootstrap::dispatch
*/
public static function dispatch( $controller = null )
public static function dispatch( $controller = null, $container = null )
{
static::setContainer($container);
// Set Timezone as required by php 5.1+
date_default_timezone_set('Europe/Madrid');

self::$language = 'en_US';

// This is the controller to use:
$ctrl = self::invokeController( $controller );
$ctrl->setContainer(static::$container);
self::$controller = $controller;
$ctrl->build();

Expand Down

0 comments on commit a4a43a8

Please sign in to comment.