PluginProbe
Defender Security – Malware Scanner, Login Security & Firewall / 6.3.0
Defender Security – Malware Scanner, Login Security & Firewall v6.3.0
6.3.0 6.2.3 6.2.4 6.2.0 6.2.1 6.2.2 6.1.0 5.3.1 5.4.0 5.4.1 5.5.0 5.5.1 5.6.0 5.6.1 5.6.2 5.7.0 5.7.1 5.7.2 5.8.0 5.8.1 5.9.0 6.0.0 6.0.1 3.0.1 3.1.0 All 141 releases
← All changes | src/model/setting/class-blacklist-lockout.php +9 -4 6.2.2 → 6.3.0 View file →
@@ -67,14 +67,14 @@
67 67 public $country_whitelist = array();
68 68
69 69 /**
70 70 * Path to downloaded GeoDB.
71 - * Important: This var doesn't support Union Types. So just 'string'.
71 + * An empty string indicates that no database path is saved.
72 72 *
73 73 * @var string
74 74 * @defender_property
75 75 */
76 - public $geodb_path = null;
76 + public $geodb_path = '';
77 77
78 78 /**
79 79 * MaxMind license key.
80 80 *
@@ -285,11 +285,16 @@
285 285 *
286 286 * @return void
287 287 */
288 288 protected function after_load(): void {
289 + // Normalize legacy or imported settings before using this value in filesystem functions.
290 + if ( ! is_string( $this->geodb_path ) ) {
291 + $this->geodb_path = '';
292 + }
293 +
289 294 if (
290 - is_string( $this->geodb_path ) &&
291 - strlen( $this->geodb_path ) > 0
295 + strlen( $this->geodb_path ) > 0 &&
296 + ! is_file( $this->geodb_path )
292 297 ) {
293 298 $service_geo = wd_di()->get( MaxMind_Geolocation::class );
294 299
295 300 preg_match( '#.*[\\\/](.*[\\\/].*)$#', $this->geodb_path, $matches );