Skip to content

Commit

Permalink
PHP 8.4 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
derickr committed Oct 4, 2024
1 parent 3696b25 commit 0f87279
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/url.php
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ class ezcUrl
* @param string $url A string URL from which to construct the URL object
* @param ezcUrlConfiguration $configuration An optional URL configuration used when parsing and building the URL
*/
public function __construct( $url = null, ezcUrlConfiguration $configuration = null )
public function __construct( $url = null, ?ezcUrlConfiguration $configuration = null )
{
if ( $url !== null )
{
Expand Down
8 changes: 4 additions & 4 deletions src/url_tools.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
Expand Down Expand Up @@ -159,15 +159,15 @@ public static function parseQueryString( $str )
* @param array(string=>mixed) $source The default array source, default $_SERVER
* @return string
*/
public static function getCurrentUrl( array $source = null )
public static function getCurrentUrl( ?array $source = null )
{
if ( $source === null )
{
$source = $_SERVER;
}

$url = '';
if ( isset( $source['HTTPS'] ) &&
if ( isset( $source['HTTPS'] ) &&
( strtolower( $source['HTTPS'] ) === 'on' || $source['HTTPS'] === '1' ) )
{
$url .= 'https://';
Expand Down

0 comments on commit 0f87279

Please sign in to comment.