Warnings in template pitech - Forum | JoomShaper
Staff replied Templates

Warnings in template pitech

Asked by Lorna Guttormson 2 months ago Last activity 2 months ago

I have Joomla 6.1 with template Pitech - 1.0.2. I am continually getting the following in my error_log
PHP Warning: Undefined variable $currentDate in /home/ottawaoc/test2.ottawaoc.ca/templates/pitech/html/com_content/article/default.php on line 52

It is just a warning but it doesn't make any sense and I would like to get rid of it or at least get it explained.

The code surrounding it is:
$isExpired = JVERSION < 4
? (strtotime($this->item->publish_down) < strtotime(Factory::getDate())) && $this->item->publish_down != Factory::getDbo()->getNullDate()
: !is_null($this->item->publish_down) && $this->item->publish_down < date("Y/m/d");
?>
There is no $currentDate anywhere in the file - so I can only guess
a) it is testing true and thinks I have version < 4 and
b) the getDate is triggering the error message and quoteing $currentDate as a fixed string not a variable anywhere.

Can I safely edit this code out entirely and hope this will be corrected in the next release of the template?

Thank you

2 replies

Toufiq Senior Staff

Hi there,

Thank you for reaching out, and I apologize for any inconvenience caused by this oversight. To better address the issue, could you kindly provide Joomla administrator access? This will enable me to thoroughly investigate the matter and provide you with a prompt resolution.

I appreciate your cooperation and will ensure to get back to you as soon as possible.

Best regards,

Toufiqur Rahman (Team Lead, Support)

Lorna Guttormson Asked this

Thank you. I have set up your account. I was held up in replying as we now have a much more serious issue. I am not sure what you can see from the admin side as I see this in my error logs and looking at the files - but you do have access to the template code where I have identified the program and line number.

Toufiq Senior Staff

Please check now. Thanks

Log in to reply.