PluginProbe
s2Member – Excellent for All Kinds of Memberships, Content Restriction Paywalls & Member Access Subscriptions / 260927
s2Member – Excellent for All Kinds of Memberships, Content Restriction Paywalls & Member Access Subscriptions v260927
260927 260917 260913 260909 260829 260814 260805 110710 110731 110812 110815 110912 110913 110915 110926 110927 111002 111003 111011 111017 111029 111105 111206 111216 111220 All 190 releases
← All changes | src/includes/externals/aweber/oauth_application.php +9 -1 260805 → 260927 View file →
@@ -54,8 +54,10 @@
54 54 *
55 55 * @package
56 56 * @version $id$
57 57 */
58 +//260816 This legacy OAuth client intentionally uses dynamic state properties; opt in explicitly on PHP 8.2+.
59 +#[\AllowDynamicProperties]
58 60 class OAuthApplication implements AWeberOAuthAdapter {
59 61 public $debug = false;
60 62
61 63 public $userAgent = 'AWeber OAuth Consumer Application 1.0 - https://labs.aweber.com/';
@@ -310,9 +312,15 @@
310 312 * @access protected
311 313 * @return void Encoded data
312 314 */
313 315 protected function encode($data) {
314 - return rawurlencode(utf8_encode($data));
316 + //260816 Avoid utf8_encode() deprecations on PHP 8.2+ while preserving older fallbacks where possible.
317 + if (function_exists('mb_convert_encoding')) {
318 + $data = mb_convert_encoding($data, 'UTF-8', 'ISO-8859-1');
319 + } elseif (function_exists('iconv')) {
320 + $data = iconv('ISO-8859-1', 'UTF-8', $data);
321 + }
322 + return rawurlencode($data);
315 323 }
316 324
317 325 /**
318 326 * createSignatureKey