Skip to content

Commit f6d238a

Browse files
authored
Avoid php 8.2 warning about dynamic properties (phpList#920)
1 parent 782465b commit f6d238a

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

public_html/lists/admin/defaultplugin.php

+10-6
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,12 @@ class phplistPlugin
4848

4949
public $needI18N = 0;
5050

51+
// Configuration items for the Settings page
52+
public $settings = [];
53+
54+
// File system path to the plugin file
55+
public $origin = '';
56+
5157
/**
5258
* set to true, if this plugin provides the WYSIWYG editor for the send page
5359
* the plugin will then need to implement:.
@@ -237,11 +243,9 @@ public function checkForUpdate(array $pluginDetails)
237243
*/
238244
public function activate()
239245
{
240-
if (isset($this->settings)) {
241-
foreach ($this->settings as $item => $itemDetails) {
242-
$GLOBALS['default_config'][$item] = $itemDetails;
243-
$GLOBALS['default_config'][$item]['hidden'] = false;
244-
}
246+
foreach ($this->settings as $item => $itemDetails) {
247+
$GLOBALS['default_config'][$item] = $itemDetails;
248+
$GLOBALS['default_config'][$item]['hidden'] = false;
245249
}
246250
}
247251

@@ -1091,7 +1095,7 @@ public function validateEmailAddress($emailAddress)
10911095
* @param string $emailaddress
10921096
* @return bool true if email address should is considered blacklisted
10931097
*/
1094-
public function isBlackListedEmail($email = '')
1098+
public function isBlackListedEmail($email = '')
10951099
{
10961100
return false;
10971101
}

public_html/lists/admin/onyxrss/onyx-rss.php

+2
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ class ONYX_RSS
4242
public $data;
4343
public $type;
4444
public $lasterror;
45+
46+
private $context;
4547
/* For when PHP v.5 is released
4648
* http://www.phpvolcano.com/eide/php5.php?page=variables
4749
* private $parser;

0 commit comments

Comments
 (0)