From 5d049c12607baa126bdb973c0855c71c886f16dd Mon Sep 17 00:00:00 2001 From: Mo Farouk <122031508+fmido88@users.noreply.github.com> Date: Fri, 24 Nov 2023 23:42:49 +0200 Subject: [PATCH] cs fixes --- classes/wordpress.php | 6 ++++-- lang/ar/enrol_wallet.php | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/classes/wordpress.php b/classes/wordpress.php index 18f550fd..1f6c6a43 100644 --- a/classes/wordpress.php +++ b/classes/wordpress.php @@ -70,7 +70,9 @@ public function request($method, $data) { if (empty($info['http_code']) || $info['http_code'] != 200 || !empty($errorno)) { // Endpoint returned an error. - debugging(print_r($response, true)); + if (is_string($response)) { + debugging($response); + } return get_string('endpoint_error', 'enrol_wallet'); } return json_decode($response, true); @@ -277,7 +279,7 @@ public function create_wordpress_user($user, $password = null) { * @param string $redirect redirection url after login or logout from wordpress website */ public function login_logout_user_to_wordpress($userid, $method, $redirect) { - $walletsource = get_config('enrol_wallet','walletsource'); + $walletsource = get_config('enrol_wallet', 'walletsource'); $allowed = get_config('enrol_wallet', 'wordpressloggins'); $wordpressurl = get_config('enrol_wallet', 'wordpress_url'); $wordpressurl = clean_param($wordpressurl, PARAM_URL); diff --git a/lang/ar/enrol_wallet.php b/lang/ar/enrol_wallet.php index 0d241426..1f87aa32 100644 --- a/lang/ar/enrol_wallet.php +++ b/lang/ar/enrol_wallet.php @@ -519,7 +519,7 @@ $string['wallet:deletecoupon'] = 'حذف كوبون المحفظة'; $string['wallet:downloadcoupon'] = 'تنزيل كوبونات المحفظة'; $string['wallet:editcoupon'] = 'تحرير الكوبونات'; -$string['wallet:enrolself'] = 'قم بشراء مقرر تدريبية من خلال مثيل محفظة التسجيل' ; +$string['wallet:enrolself'] = 'قم بشراء مقرر تدريبية من خلال مثيل محفظة التسجيل'; $string['wallet:manage'] = 'إدارة المستخدمين المسجلين'; $string['wallet:unenrol'] = 'إلغاء تسجيل المستخدمين من المقرر الدراسي'; $string['wallet:unenrolself'] = 'إلغاء التسجيل الذاتي من المقرر الدراسي';