Skip to content

Commit

Permalink
Fix code for PHP 8.0+.
Browse files Browse the repository at this point in the history
  • Loading branch information
kagg-design committed Jul 22, 2023
1 parent f16c185 commit 2e4e4ca
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/php/Settings/Abstracts/SettingsBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,7 @@ protected function init_settings() {
}

$settings_exist = is_array( $this->settings );
$this->settings = (array) $this->settings;
$form_fields = $this->form_fields();
$network_wide_setting = array_key_exists( self::NETWORK_WIDE, (array) $this->settings ) ?
$this->settings[ self::NETWORK_WIDE ] :
Expand Down Expand Up @@ -568,7 +569,7 @@ protected function get_names_from_referer(): array {
$query = filter_input( INPUT_POST, '_wp_http_referer', FILTER_SANITIZE_URL );
}

$query = wp_parse_url( $query, PHP_URL_QUERY ) ?: '';
$query = wp_parse_url( (string) $query, PHP_URL_QUERY ) ?: '';
$args = $this->wp_parse_str( $query );

return [
Expand Down

0 comments on commit 2e4e4ca

Please sign in to comment.