PluginProbe
Simple Analytics / 1.102
Simple Analytics v1.102
1.109 1.108 1.107 1.106 1.73 1.74 1.75 1.76 1.77 1.78 1.79 1.8 1.80 1.81 1.82 1.83 1.84 1.85 1.86 1.87 1.88 1.89 1.9 1.90 1.91 All 98 releases
← All changes | src/Settings/Blocks/Fields/Checkboxes.php +4 -13 1.1091.102 View file →
@@ -31,22 +31,13 @@
31 31
32 32 public function getValueSanitizer(): callable
33 33 {
34 34 return function ($value) {
35 - if (! is_array($value)) {
36 - $value = [$value];
37 - }
35 + if (! is_array($value)) $value = [$value];
38 36
39 - return array_filter(
40 - $value,
41 - function ($item) {
42 - if (! is_scalar($item)) {
43 - return false;
44 - }
45 -
46 - return array_key_exists((string) $item, $this->options);
47 - }
48 - );
37 + return array_filter($value, function ($item) {
38 + return array_key_exists($item, $this->options);
39 + });
49 40 };
50 41 }
51 42
52 43 public function render(): void