| @@ -1885,9 +1885,12 @@ | ||
| 1885 | 1885 | $vbo_tn = VikBooking::getTranslator(); |
| 1886 | 1886 | |
| 1887 | 1887 | if ($row['status'] == 'confirmed' && !(VikBooking::multiplePayments() && $row['paymcount'] > 0)) { |
| 1888 | 1888 | // booking can be paid only if not confirmed or if multiple payments are enabled and payment counter for booking greater than zero |
| 1889 | - VBOHttpDocument::getInstance()->close(409, 'Conflicting and unexpected payment validation for this reservation'); | |
| 1889 | + if (empty($row['idorderota']) || !empty($row['totpaid'])) { | |
| 1890 | + // accept only the first payment for an OTA reservation | |
| 1891 | + VBOHttpDocument::getInstance()->close(409, 'Conflicting and unexpected payment validation for this reservation'); | |
| 1892 | + } | |
| 1890 | 1893 | } |
| 1891 | 1894 | |
| 1892 | 1895 | /** |
| 1893 | 1896 | * Check split stay reservation data. |
| @@ -3277,9 +3280,9 @@ | ||
| 3277 | 3280 | if (!in_array($detkey, $front_keys)) { |
| 3278 | 3281 | // push the key of the guest details for later comparison |
| 3279 | 3282 | array_push($front_keys, $detkey); |
| 3280 | 3283 | } |
| 3281 | - if (strlen($detval)) { | |
| 3284 | + if (is_scalar($detval) && strlen($detval)) { | |
| 3282 | 3285 | // push value only if not empty |
| 3283 | 3286 | if (!isset($guests_details[$ind])) { |
| 3284 | 3287 | $guests_details[$ind] = array(); |
| 3285 | 3288 | } |