Error 0 strtotime(): argument php8.1 Fabrik3

ontarget

Active Member
Hi users are occasionally getting the following error when completing a fabrik (multigroup) form
Code:
strtotime(): argument #1 ($datetime) must be of type string array given
I have a few standard date plugin elements changed to d-m-Y format with no advanced stuff.
I also have a read only field element grabbing a date value which I believe is the culprit
PHP:
$myapp = JFactory::getApplication();

$myparam = $myapp->input->getString('aaa_participant_claim___course_start_date');

/*return $myparam;*/

return date ('d-m-Y', strtotime($myparam));
The difficulty is I havent been able to replicate the error myself so it's difficult to determine.
would you suggest any improvement to the code above, is it php8.1 compatible?
Thanks for any suggestions
 
I suggest you put a check in such as:

if (is_array($myparam)) var_dump($myparam); die;

And see what is output. Perhaps that will give you some clues.
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top