PDA

View Full Version : Strict Standards Error


Raw Sugar
12-21-2017, 12:08 AM
This is on vB 3.8.7, running PHP 5.6.31.

This error is showing up most recently on the memberinfo page, but has also shown up in the UserCP. I've looked at the files referenced and can't figure out what it means. I looked up the Strict Standards error in general, but I'm confused about how to fix it for vB files.

A few of the errors I've gotten:

Strict Standards: Declaration of vB_Group_Collection_Discussion::collection_sql() should be compatible with vB_Group_Collection_Message::collection_sql($force _refresh = false) in /home/.../includes/class_groupmessage.php on line 1899

Strict Standards: Declaration of vB_Group_Bit_Factory::create() should be compatible with & vB_Bit_Factory::create($item) in /home/.../includes/class_groupmessage.php on line 2918

Strict Standards: Declaration of vB_ProfileBlock_Infractions::block_is_enabled() should be compatible with vB_ProfileBlock::block_is_enabled($id) in /home/.../includes/class_profileblock.php on line 1942

Thank you in advance for your help!!

Dave
12-21-2017, 12:19 AM
This error usually indicates that the function signature (parameters) of both should be exactly the same.
You can also turn off error reporting in your PHP.ini file to hide the errors.

Raw Sugar
12-21-2017, 12:27 AM
This error usually indicates that the function signature (parameters) of both should be exactly the same.
You can also turn off error reporting in your PHP.ini file to hide the errors.

Is it bad if I just turn off error reporting?

I'm not sure that I have access to the PHP.ini file. Where would it be?

Dave
12-21-2017, 12:30 AM
Generally you want to turn off error reporting because it exposes certain information about your server that no one needs to know about.

You should ask your host about the PHP.ini file, it varies a lot per server host.

Raw Sugar
12-21-2017, 12:58 AM
Oh! I found it!
What do I put in the .ini file to turn off reporting??

Thank you, Dave!

In Omnibus
12-21-2017, 01:06 AM
Oh! I found it!
What do I put in the .ini file to turn off reporting??

Thank you, Dave!

You could use something like the following:

// toggle this to change the setting
define('DEBUG', true);
// you want all errors to be triggered
error_reporting(E_ALL);

if(DEBUG == true)
{
// you're developing, so you want all errors to be shown
display_errors(true);
// logging is usually overkill during dev
log_errors(false);
}
else
{
// you don't want to display errors on a prod environment
display_errors(false);
// you definitely wanna log any occurring
log_errors(true);
}

Raw Sugar
12-21-2017, 01:57 AM
Thank you!!!!