Skip to content

Commit

Permalink
Merge pull request cypht-org#1254 from amaninyumu1/PHP_Warning_Undefi…
Browse files Browse the repository at this point in the history
…ned_array_key_redirect_uri-auth_url

[FIX] modules.php PHP Warning Undefined array key of redirect uri and…
  • Loading branch information
Yannick243 authored Oct 16, 2024
2 parents a8dc883 + eed7774 commit a425741
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/wordpress/modules.php
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,8 @@ class Hm_Handler_setup_wordpress_connect extends Hm_Handler_Module {
public function process() {
$details = wp_connect_details($this->config);
if (!empty($details)) {
$oauth2 = new Hm_Oauth2($details['client_id'], $details['client_secret'], $details['redirect_uri']);
$this->out('wp_auth_url', $oauth2->request_authorization_url($details['auth_url'], 'global', 'wp_authorization'));
$oauth2 = new Hm_Oauth2($details['client_id'], $details['client_secret'], $details['redirect_uri'] ?? null);
$this->out('wp_auth_url', $oauth2->request_authorization_url($details['auth_url'] ?? null, 'global', 'wp_authorization'));
$this->out('wp_connect_details', $this->user_config->get('wp_connect_details', array()));
}
}
Expand Down

0 comments on commit a425741

Please sign in to comment.