Check for correct datetime format on ended_at and cancelled_at date API parameters.
This commit is contained in:
parent
abe78b4883
commit
3c18343722
2 changed files with 2 additions and 2 deletions
|
@ -65,7 +65,7 @@ function civicrm_api3_twingle_donation_endrecurring($params) {
|
|||
|
||||
try {
|
||||
// Validate date for parameter "ended_at".
|
||||
if (!DateTime::createFromFormat('Ymd', $params['ended_at'])) {
|
||||
if (!DateTime::createFromFormat('YmdHis', $params['ended_at'])) {
|
||||
throw new CiviCRM_API3_Exception(
|
||||
E::ts('Invalid date for parameter "ended_at".'),
|
||||
'invalid_format'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue