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/Repositories/AvailabilityRepository.php +7 -1 3.0.8 → 3.0.16 View file →
@@ -72,9 +72,15 @@
72 72 */
73 73 public function findByTripIdAndDate(int $tripId, string $departureDate): ?object
74 74 {
75 75 $table = esc_sql($this->table);
76 -
76 +
77 + // departure_date is a DATE column — strip any time component so a datetime
78 + // input still matches (avoids date-vs-datetime string-compare misses).
79 + if (preg_match('/^(\d{4}-\d{2}-\d{2})/', $departureDate, $m)) {
80 + $departureDate = $m[1];
81 + }
82 +
77 83 $result = $this->wpdb->get_row($this->wpdb->prepare(
78 84 "SELECT * FROM `{$table}`
79 85 WHERE trip_id = %d
80 86 AND departure_date = %s