Hi Cindy,
We want to use OpenID connect with last MediaWiki release - 1.35.1. It requires PHP 7.3.19+ and when we try to authenticate we get an error: php deprecated: array_key_exists(): Using array_key_exists() on objects is deprecated. Use isset() or property_exists() instead
This function is using here (912 line):
public function requestUserInfo($attribute = null) {
$user_info_endpoint = $this->getProviderConfigValue("userinfo_endpoint");
$schema = 'openid';
$user_info_endpoint .= "?schema=" . $schema;
//The accessToken has to be send in the Authorization header, so we create a new array with only this header.
$headers = array("Authorization: Bearer {$this->accessToken}");
$user_json = json_decode($this->fetchURL($user_info_endpoint,null,$headers));
$this->userInfo = $user_json;
if($attribute === null) {
return $this->userInfo;
} else if (array_key_exists($attribute, $this->userInfo)) {
return $this->userInfo->$attribute;
} else {
return null;
}
}
I tried to fix this using property_exists() function, but seems like it don't working well. Could you please help with it?
Regrads,
Stanislav Babaryka
stanislav.babaryka@gmail.com