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 | framework/base/class-model.php +10 -1 6.0.1 → 6.3.0 View file →
@@ -233,9 +233,18 @@
233 233 $this->import_old_way( $data );
234 234 } else {
235 235 foreach ( array_keys( $this->annotations ) as $property ) {
236 236 if ( isset( $data[ $property ] ) && $this->has_property( $property ) ) {
237 - $this->$property = $data[ $property ];
237 + $value = $data[ $property ];
238 + $type = $this->annotations[ $property ]['type'];
239 + if ( false !== $type ) {
240 + if ( 'boolean' === $type || 'bool' === $type ) {
241 + $value = filter_var( $value, FILTER_VALIDATE_BOOLEAN );
242 + } else {
243 + settype( $value, $type );
244 + }
245 + }
246 + $this->$property = $value;
238 247 }
239 248 }
240 249
241 250 $this->sanitize();