Skip to content

Commit

Permalink
Do not feed null into trim()
Browse files Browse the repository at this point in the history
  • Loading branch information
nibra committed Aug 21, 2022
1 parent 81ad0e5 commit 5aedbd5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"license": "GPL-2.0-or-later",
"require": {
"php": "^7.2.5|~8.0.0|~8.1.0",
"ext-json": "*",
"psr/log": "^1.0",
"psr/http-message": "^1.0",
"joomla/event": "^2.0",
Expand Down
4 changes: 2 additions & 2 deletions src/AbstractWebApplication.php
Original file line number Diff line number Diff line change
Expand Up @@ -959,7 +959,7 @@ protected function loadSystemUris($requestUri = null)
}

// Check to see if an explicit base URI has been set.
$siteUri = trim($this->get('site_uri'));
$siteUri = trim($this->get('site_uri') ?? '');

if ($siteUri != '')
{
Expand Down Expand Up @@ -1010,7 +1010,7 @@ protected function loadSystemUris($requestUri = null)
}

// Get an explicitly set media URI is present.
$mediaURI = trim($this->get('media_uri'));
$mediaURI = trim($this->get('media_uri') ?? '');

if ($mediaURI)
{
Expand Down

0 comments on commit 5aedbd5

Please sign in to comment.