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/Services/TripService.php +10 -5 3.0.3 → 3.0.16 View file →
@@ -192,10 +192,10 @@
192 192 if (empty($data['slug'])) {
193 193 throw new \InvalidArgumentException('Trip slug is required');
194 194 }
195 195
196 - if (!preg_match('/^[a-z0-9-]+$/', $data['slug'])) {
197 - throw new \InvalidArgumentException('Trip slug can only contain lowercase letters, numbers, and hyphens');
196 + if (!preg_match('/^[\pL\pN-]+$/u', $data['slug'])) {
197 + throw new \InvalidArgumentException('Trip slug can only contain letters, numbers, and hyphens');
198 198 }
199 199
200 200 // Check if slug is unique (exclude current trip when updating)
201 201 $existing = $this->repository->findBySlug($data['slug']);
@@ -275,10 +275,10 @@
275 275 * Process before create
276 276 */
277 277 protected function processBeforeCreate(array $data): array
278 278 {
279 - if (!preg_match('/^[a-z0-9-]+$/', $data['slug'])) {
280 - throw new \InvalidArgumentException('Trip slug can only contain lowercase letters, numbers, and hyphens');
279 + if (!preg_match('/^[\pL\pN-]+$/u', $data['slug'])) {
280 + throw new \InvalidArgumentException('Trip slug can only contain letters, numbers, and hyphens');
281 281 }
282 282
283 283 if (empty($data['status'])) {
284 284 $data['status'] = 'draft';
@@ -1261,9 +1261,14 @@
1261 1261 * Count departures by date
1262 1262 */
1263 1263 public function countDeparturesByDate(int $tripId, string $date): int
1264 1264 {
1265 - return $this->repository->countDeparturesByDate($tripId, $date);
1265 + // The December 2025 service/controller refactor moved this query to
1266 + // TripAvailabilityRepository::countAvailableDeparturesByDate() but left
1267 + // this call pointing at TripRepository, where no such method exists —
1268 + // so the storefront's date-pricing request (fired whenever a customer
1269 + // picks a date) has returned a fatal 500 ever since.
1270 + return $this->availabilityRepository->countAvailableDeparturesByDate($tripId, $date);
1266 1271 }
1267 1272
1268 1273 /**
1269 1274 * Get trip with availability