Page 1 of 1

Non static method ^ "endless"

Posted: 25 Jan 2015, 16:18
by beating
Hi all,

we have a lot of these messages in error_log file:
[...]
[Sun Jan 25 13:41:19 2015] [warn] [client 66.249.73.178] mod_fcgid: stderr: PHP Strict Standards: Non-static method PhocaGalleryFileThumbnail::getThumbnailName() should not be called statically, assuming $this from incompatible context in /home/beatingcancercenter/public_html/administrator/components/com_phocagallery/libraries/phocagallery/image/image.php on line 53
[Sun Jan 25 13:41:19 2015] [warn] [client 66.249.73.178] mod_fcgid: stderr: PHP Strict Standards: Non-static method PhocaGalleryPath::getPath() should not be called statically, assuming $this from incompatible context in /home/beatingcancercenter/public_html/administrator/components/com_phocagallery/libraries/phocagallery/file/filethumbnail.php on line 24
[Sun Jan 25 13:41:19 2015] [warn] [client 66.249.73.178] mod_fcgid: stderr: PHP Strict Standards: Non-static method PhocaGalleryPath::getInstance() should not be called statically, assuming $this from incompatible context in /home/beatingcancercenter/public_html/administrator/components/com_phocagallery/libraries/phocagallery/path/path.php on line 36
[...]
Version component: 3.2.8
Joomla version: 2.5.28

Any idea?
Is it possible to use this "trick" for every files?



i.e. 1) open file /path/to/file/libraries/phocagallery/fileXYZ.php
2) find line: function XYZ_functionclass()
3) replace this line with: public static function XYZ_functionclass()

Many thanks and best regards. 8)

Re: Non static method ^ "endless"

Posted: 26 Jan 2015, 00:56
by Jan
Hi,

yes, this way you can solve this.

See:
https://www.phoca.cz/documents/50-phoca/ ... tic-method

Since Phoca Gallery 4, the strict standards, notices and warnings are limited (code overwritten to not produce such development warnings in log)

Anyway, if this is production server, you can disable the error logging of the notices and warnings too. :idea:

Jan