phocadownload plugin PHP Strict Standards

Phoca Download - download manager
jtechmedical
Phoca Member
Phoca Member
Posts: 13
Joined: 21 Jun 2012, 19:41

phocadownload plugin PHP Strict Standards

Post by jtechmedical »

The phocadownload plugin has the following PHP Strict Standards (joomla 2.5.x and joomla 3.3.x)
[Mon Jun 23 10:47:12 2014] [warn] [client] mod_fcgid: stderr: PHP Strict Standards: Only variables should be assigned by reference in /plugins/content/phocadownload/phocadownload.php on line 30
[Mon Jun 23 10:47:12 2014] [warn] [client] mod_fcgid: stderr: PHP Strict Standards: Only variables should be assigned by reference in /plugins/content/phocadownload/phocadownload.php on line 31

original lines 30 and 31

Code: Select all

$document	= &JFactory::getDocument();
$db 			= &JFactory::getDBO();		
change to

Code: Select all

$document	= JFactory::getDocument();
$db 			= JFactory::getDbo();	
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48550
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: phocadownload plugin PHP Strict Standards

Post by Jan »

Hi, thank you for the info.

I hope I will take a look at it soon:
https://www.phoca.cz/documents/50-phoca/ ... tic-method

Jan
If you find Phoca extensions useful, please support the project
jtechmedical
Phoca Member
Phoca Member
Posts: 13
Joined: 21 Jun 2012, 19:41

Re: phocadownload plugin PHP Strict Standards

Post by jtechmedical »

We look forward to an updated version.
Considering that you have a 3.x version of the plugin and joomla 3.2.5+ requires php 5.3.10+ it is a good time to consider removing strict standards items.
As for disabling error reporting, Personally I follow Brian Teeman's advice not to disable error reporting for joomla (personally I typically only do this on a development server and keep the live site set to log errors to a file).

Thanks again for the consideration for this change and the great components you make.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48550
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: phocadownload plugin PHP Strict Standards

Post by Jan »

Hi,

as written in the article.

- New components are checked for the strict standards
- Current components (over some hundred thousands of lines of code) are continuously checked and overwritten - e.g. Phoca Gallery or Phoca Download are ready now.

If you log errors, maybe logging errors without notices, warnings, etc. is the way.

When you look at Phoca extensions and you will compare it to other extensions, you will see, that I am strongly check for notices and warnings (e.g. to not produce them if someone has enabled php error reporting or to not write long error logs). But as written, mostly the components were written for PHP 4 and they are continuously overwritten for PHP5. My time is really limited, so the priority is to bring new version running under newest Joomla!

If I should decide between:

a) to release new version which will run in newest Joomla! but know that there are strict standards, etc. warnings or
b) to check all the code to prevent from strict standards by every extension immediately

I will select a) because if I will select b) for now only one extension will be ready for Joomla! 3 CMS (it is really compromise based on time issue and when I know, strict standards can be easily disabled and in fact, on production site they should not be enabled, I cannot select b) but a) )

But this does not mean, I don't know about the need to remove the warnings and notices.

:idea:
Thank you for understanding.

Jan
If you find Phoca extensions useful, please support the project
MikeBrice
Phoca Member
Phoca Member
Posts: 11
Joined: 02 Feb 2017, 11:03

Re: phocadownload plugin PHP Strict Standards

Post by MikeBrice »

It appears to have been over 2 years since there was a comment on this thread. I have just upgraded from Joomla V2.5 to V.3.5 with the associated PhocaGallery Component upgrade. I see lots of messages I do not want to see. I am not interested in hiding messages because one component generates a lot of unnecessary messages. Are you going to address this issue or not ?
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48550
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: phocadownload plugin PHP Strict Standards

Post by Jan »

Hi, which extension and which version do you run, which warnings do you get exactly?

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