PluginProbe
VikBooking Hotel Booking Engine & PMS / 1.8.16
VikBooking Hotel Booking Engine & PMS v1.8.16
1.8.16 1.8.15 1.8.14 1.8.13 1.8.12 1.8.11 1.8.10 1.8.9 1.8.6 1.8.7 1.8.8 trunk 1.6.0 1.6.1 1.6.2 1.6.3 1.6.4 1.6.5 1.6.6 1.6.7 1.6.8 1.6.9 1.7.0 1.7.1 1.7.2 All 37 releases
← All changes | site/views/operators/view.html.php +4 -3 1.7.2 → 1.8.16 View file →
@@ -43,12 +43,13 @@
43 43 // operator is logged in (default_dashboard.php)
44 44 $tpl = 'dashboard';
45 45 }
46 46
47 - // turn the permissions into an associative (or empty) array
47 + // convert the JSON strings into array values
48 48 if ($operator) {
49 - $operator['perms'] = !empty($operator['perms']) ? json_decode($operator['perms'], true) : [];
50 - $operator['perms'] = is_array($operator['perms']) ? $operator['perms'] : [];
49 + $operator['perms'] = !empty($operator['perms']) ? (is_scalar($operator['perms']) ? (array) json_decode($operator['perms'], true) : $operator['perms']) : [];
50 + $operator['work_days_week'] = !empty($operator['work_days_week']) ? (is_scalar($operator['work_days_week']) ? (array) json_decode($operator['work_days_week'], true) : $operator['work_days_week']) : [];
51 + $operator['work_days_exceptions'] = !empty($operator['work_days_exceptions']) ? (is_scalar($operator['work_days_exceptions']) ? (array) json_decode($operator['work_days_exceptions'], true) : $operator['work_days_exceptions']) : [];
51 52 }
52 53
53 54 $this->operator = $operator;
54 55 $this->tool = $tool;