Non static method ^ "endless"

Phoca Gallery - image gallery extension
beating
Phoca Newbie
Phoca Newbie
Posts: 1
Joined: 25 Jan 2015, 16:09

Non static method ^ "endless"

Post 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)
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47887
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Non static method ^ "endless"

Post 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
If you find Phoca extensions useful, please support the project
Post Reply