Best practice forum (Archived)

Totara sync empty custom user date field error

 
? ?
Totara sync empty custom user date field error
על ידי ? ? בתאריך 26/12/2013, 08:26
 

When importing data in to a custom user profile date field via Totara Sync, there is an error if the date in the user.csv source file is empty. I think that Totara Sync should allow an empty field, such as it does for other field types. Errors listed below:

(Totara 2.5.2)

PHP Warning: date() expects parameter 2 to be long, string given in /Sites/totara25/user/profile/field/datetime/field.class.php on line 55

Warning: date() expects parameter 2 to be long, string given in /Sites/totara25/user/profile/field/datetime/field.class.php on line 55
PHP Notice: Undefined offset: 1 in /Sites/totara25/user/profile/field/datetime/field.class.php on line 64

Notice: Undefined offset: 1 in /Sites/totara25/user/profile/field/datetime/field.class.php on line 64
PHP Notice: Undefined offset: 2 in /Sites/totara25/user/profile/field/datetime/field.class.php on line 64

Notice: Undefined offset: 2 in /Sites/totara25/user/profile/field/datetime/field.class.php on line 64

So it would appear that Totara is passing an empty string to the date function, when perhaps it would be more appropriate so skip a call to the date function and just set the custom date field to blank if there is already a date, or don't set a date at all if there is currently no date set on the custom user profile data field.

me
Re: Totara sync empty custom user date field error
על ידי George Angus בתאריך 26/12/2013, 12:16
קבוצה Totara

Hi Jamie,

This has been fixed in 2.5.3 

regards,

George.

? ?
Re: Totara sync empty custom user date field error
על ידי ? ? בתאריך 27/12/2013, 10:03
 

Thanks George!