Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix PHP 8 compatibility issues #54

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions CRM/Gotowebinar/Utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class CRM_Gotowebinar_Utils {
*
* @return validToken
*/
public function refreshAccessToken(){
public static function refreshAccessToken(){
// FIX ME : currently not refreshing tokens automatically - if the the above response returns 'InvalidToken' error, setting validToken flag as FALSE and displaying authentication fields again.
$validToken = FALSE;
$refreshToken = CRM_Gotowebinar_Utils::getItem(CRM_Gotowebinar_Form_Setting::WEBINAR_SETTING_GROUP,
Expand Down Expand Up @@ -41,7 +41,7 @@ public function refreshAccessToken(){
*
* @return TRUE(updated) / FALSE(not updated)
*/
public function storeAccessToken($clientInfo){
public static function storeAccessToken($clientInfo){
//Update the values iff all the keys exist in the array
if(array_key_exists('access_token',$clientInfo) && array_key_exists('organizer_key',$clientInfo) && array_key_exists('refresh_token',$clientInfo)){
CRM_Gotowebinar_Utils::setItem($clientInfo['access_token'],
Expand All @@ -67,7 +67,7 @@ public function storeAccessToken($clientInfo){
*
* @return response/result
*/
static function apiCall(
public static function apiCall(
$url = NULL,
$headers = NULL,
$postFields = NULL
Expand Down Expand Up @@ -101,7 +101,7 @@ static function apiCall(
/**
*Function to register a participant for a webinar event
*/
public function registerParticipant($webinar_key, $fields=NULL){
public static function registerParticipant($webinar_key, $fields=NULL){
$accessToken = CRM_Gotowebinar_Utils::getItem(CRM_Gotowebinar_Form_Setting::WEBINAR_SETTING_GROUP,
'access_token');
$organizerKey = CRM_Gotowebinar_Utils::getItem(CRM_Gotowebinar_Form_Setting::WEBINAR_SETTING_GROUP,
Expand Down Expand Up @@ -153,8 +153,8 @@ public static function setItem($value, $group, $name) {
*
* @return boolean
*/
function isCiviCRMVersion47(){
public static function isCiviCRMVersion47(){
return version_compare(CRM_Utils_System::version(), '4.7', '>');
}

}
}
Loading