SP Medical - Call To Undefined Function Cal_days_in_month() - Question | JoomShaper

SP Medical - Call To Undefined Function Cal_days_in_month()

Kostas Konstantinidis

Kostas Konstantinidis

Extension 1 year ago

HI there, Just finished the quick J4 installation package of template MEDICO with PHP 8.1 When try to SP Medical/Dashboard I get the error "Call to undefined function cal_days_in_month()" thank's

0
3 Answers
Ofi Khan
Ofi Khan
Accepted Answer
Support Agent 1 year ago #104626

Hello Kostas Konstantinidis

You need to compile PHP with --enable-calendar extension. Please check the Documentation If you are not sure how to compile, then check this Documentation

Best regards

0
Kostas Konstantinidis
Kostas Konstantinidis
Accepted Answer
1 year ago #104752

Hi Ofi Khan I got in touch with my provider and they installed calendar extension. At the first sight it seems to work but when I try to create a new appoitments I get "Deprecated: Function strftime() is deprecated in .../public_html/libraries/src/Form/Field/CalendarField.php on line 322" Have you any idea on that too? Just to let you know. I completed the full translation for SP Medical in Greek language... If you interesting about that I could send you the files. Thanks

0
Ofi Khan
Ofi Khan
Accepted Answer
Support Agent 1 year ago #104776

You need to remove strftime() function from CalendarField.php on line 322 and use date() function instead.

// example code

// old code using strftime
$formatted_date = strftime("%Y-%m-%d", $timestamp);

// updated code using date
$formatted_date = date("Y-m-d", $timestamp);

You have to talk to your hosting provider for this.

We do not have any plan to make the translation at this moment from us. It is all on user's end.

0