Use of undefined constant DATE_FORMAT_LC3

Phoca Download - download manager
plamen
Phoca Professional
Phoca Professional
Posts: 100
Joined: 16 Mar 2014, 13:23

Use of undefined constant DATE_FORMAT_LC3

Post by plamen »

Hi Jan,
Recently my site is showing above file to download:

Code: Select all

Warning: Use of undefined constant DATE_FORMAT_LC3 - assumed 'DATE_FORMAT_LC3' (this will throw an Error in a future version of PHP) in .../administrator/components/com_phocadownload/libraries/phocadownload/file/file.php on line 227
DATE_FORMAT_LC3 exists in language file, also tried to add it as an overridden constant to no avail.
All languages reverted to English, all caches cleared, but same Warning label.
J 3.9.18
PD 3.2.0
PHP Version 7.2.29

Any ideas?
plamen
Phoca Professional
Phoca Professional
Posts: 100
Joined: 16 Mar 2014, 13:23

Re: Use of undefined constant DATE_FORMAT_LC3

Post by plamen »

Added comment:
Substituting "DATE_FORMAT_LC3" with "d F Y" at line 227 in the subject file eliminates the warning.
Seem like this constant is not defined inside Joomla.
christine
Phoca Hero
Phoca Hero
Posts: 2724
Joined: 28 Nov 2010, 17:20

Re: Use of undefined constant DATE_FORMAT_LC3

Post by christine »

Hi plamen,

check again your PD version: https://www.phoca.cz/download/category/ ... -component. Thank you.
You should use PHP 7.3.

Kind regards
Christine
plamen
Phoca Professional
Phoca Professional
Posts: 100
Joined: 16 Mar 2014, 13:23

Re: Use of undefined constant DATE_FORMAT_LC3

Post by plamen »

Your version: 3.2.0 - that's reported.
PHP 7.3 is recommended, but 5.3.10 is minimum for Joomla 3.9, why I have to use 7.3?
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47810
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Use of undefined constant DATE_FORMAT_LC3

Post by Jan »

Hi, thank you for the info, there is an error, which will be fixed in next version.

For now you can do a quick fix:

FROM:

Code: Select all

public static function getFileTime($filename, $function, $format = DATE_FORMAT_LC3) {
TO:

Code: Select all

public static function getFileTime($filename, $function, $format = 'DATE_FORMAT_LC3') {
		
		$format = JText::_($format);
on line 227 in:
administrator/components/com_phocadownload/libraries/phocadownload/file/file.php

Thank you,
Jan
If you find Phoca extensions useful, please support the project
plamen
Phoca Professional
Phoca Professional
Posts: 100
Joined: 16 Mar 2014, 13:23

Re: Use of undefined constant DATE_FORMAT_LC3

Post by plamen »

Thank you, fixed.
Waiting for update as well.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47810
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Use of undefined constant DATE_FORMAT_LC3

Post by Jan »

Ok, thank you for info.

Jan
If you find Phoca extensions useful, please support the project
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47810
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Use of undefined constant DATE_FORMAT_LC3

Post by Jan »

Hi, should be OK in version 3.2.1:
https://www.phoca.cz/news/1098-phoca-do ... 1-released

Jan
If you find Phoca extensions useful, please support the project
Post Reply