Skip to content

Commit

Permalink
Update BaseController.php (joomla#36797)
Browse files Browse the repository at this point in the history
Fixes `Deprecated: ucfirst(): Passing null to parameter #1 ($string) of type string is deprecated in /home/beat/www/j/libraries/src/MVC/Controller/BaseController.php on line 286`
and fixes `Deprecated: strtolower(): Passing null to parameter #1 ($string) of type string is deprecated in /home/beat/www/j/libraries/src/MVC/Controller/BaseController.php on line 684`
  • Loading branch information
beat authored Jan 23, 2022
1 parent d19bbe0 commit 3de1ce1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libraries/src/MVC/Controller/BaseController.php
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ public static function getInstance($prefix, $config = array())
else
{
// Base controller.
$type = null;
$type = '';

// Define the controller filename and path.
$file = self::createFileName('controller', array('name' => 'controller', 'format' => $format));
Expand Down Expand Up @@ -681,7 +681,7 @@ public function execute($task)
{
$this->task = $task;

$task = strtolower($task);
$task = strtolower((string) $task);

if (isset($this->taskMap[$task]))
{
Expand Down

0 comments on commit 3de1ce1

Please sign in to comment.