Skip to content

Commit

Permalink
fix deprecation warning str_replace()
Browse files Browse the repository at this point in the history
- add empty string if value is null
  • Loading branch information
gesinn-it-ilm committed Nov 22, 2024
1 parent 3d1324f commit d964728
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion includes/Specials/BrowseData/SpecialBrowseData.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public function execute( $query ): void {

// get information on current category, subcategory and filters
// that have already been applied from the query string
$category = str_replace( '_', ' ', $request->getVal( '_cat' ) );
$category = str_replace( '_', ' ', $request->getVal( '_cat' ) ?? '' );
// if query string did not contain this variables, try the URL
if ( !$category ) {
$queryparts = explode( '/', $query, 1 );
Expand Down

0 comments on commit d964728

Please sign in to comment.