PluginProbe
Yatra – Travel Booking & Tour Operator Software / 3.0.16
Yatra – Travel Booking & Tour Operator Software v3.0.16
3.0.16 3.0.15 3.0.14 3.0.14.1 3.0.14.2 3.0.12 3.0.13 3.0.11 3.0.10 3.0.9 3.0.8 3.0.7 3.0.6 3.0.5 3.0.5.1 3.0.4 3.0.3 3.0.2.9 3.0.2.7 3.0.2.8 3.0.2.6 trunk 1.0.0 2.0.0 2.0.1 All 84 releases
← All changes | app/Controllers/BookingsController.php +7 -1 3.0.14.2 → 3.0.16 View file →
@@ -823,9 +823,15 @@
823 823 'trip_title' => $trip ? ($trip->title ?? $booking['trip_title'] ?? __('Trip Booking', 'yatra')) : ($booking['trip_title'] ?? __('Trip Booking', 'yatra')),
824 824 // Trip duration comes from duration_days/duration_nights (there is no
825 825 // `duration` column — accessing it caused a blank value + PHP notice).
826 826 'trip_duration' => $trip
827 - ? yatra_format_duration((int) ($trip->duration_days ?? 0), isset($trip->duration_nights) ? (int) $trip->duration_nights : null)
827 + ? yatra_format_duration(
828 + (int) ($trip->duration_days ?? 0),
829 + isset($trip->duration_nights) ? (int) $trip->duration_nights : null,
830 + // Hour-based day tours: "8 hours" instead of "1 day". Absent
831 + // or NULL on every day-based trip, which keeps its wording.
832 + (int) ($trip->duration_hours ?? 0)
833 + )
828 834 : '',
829 835 'trip_difficulty' => $trip ? ($trip->difficulty_name ?? '') : '',
830 836 'departure_location' => $trip ? ($trip->departure_location ?? '') : '',
831 837 'destination' => $trip ? ($trip->destination ?? '') : '',