Skip to content

Commit

Permalink
[PHP 8.1] Fix UriHelper Automatic conversion of false to array, upstr…
Browse files Browse the repository at this point in the history
…eam for Joomla #36774 (#30)
  • Loading branch information
beat authored Jan 24, 2022
1 parent 8133dae commit e3968e0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/UriHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class UriHelper
*/
public static function parse_url($url)
{
$result = false;
$result = array();

// Build arrays of values we need to decode before parsing
$entities = array('%21', '%2A', '%27', '%28', '%29', '%3B', '%3A', '%40', '%26', '%3D', '%24', '%2C', '%2F', '%3F', '%23', '%5B', '%5D');
Expand All @@ -51,6 +51,6 @@ public static function parse_url($url)
}
}

return $result;
return count($result) > 0 ? $result : false;
}
}

0 comments on commit e3968e0

Please sign in to comment.