Even I changed php.ini file. I changed php.ini the default is:
; display_startup_errors
; Default Value: Off
; Development Value: On
; Production Value: Off
; error_reporting
; Default Value: E_ALL & ~E_NOTICE
; Development Value: E_ALL | E_STRICT
; Production Value: E_ALL & ~E_DEPRECATED
I change them into:
display_startup_errors
Default Value: Off
Development Value: On
Production Value: Off
error_reporting
Default Value: E_ALL & ~E_NOTICE
Development Value: E_ALL | E_STRICT
Production Value: E_ALL & ~E_DEPRECATED
I still keep getting the following errors:
Strict Standards: Declaration of CUser::Save() should be compatible with that of CBase::Save() in D:\xampp\htdocs\web\newpacific\include\user.class.php on line 128
Strict Standards: Declaration of CUser::Add() should be compatible with that of CBase::Add() in D:\xampp\htdocs\web\newpacific\include\user.class.php on line 128
Strict Standards: Declaration of CUser::Edit() should be compatible with that of CBase::Edit() in D:\xampp\htdocs\web\newpacific\include\user.class.php on line 128
Strict Standards: Declaration of CNewsLetter::Save() should be compatible with that of CBase::Save() in D:\xampp\htdocs\web\newpacific\include\newsletter.class.php on line 89
Strict Standards: Declaration of CNewsLetter::Add() should be compatible with that of CBase::Add() in D:\xampp\htdocs\web\newpacific\include\newsletter.class.php on line 89
Strict Standards: Declaration of CNewsLetter::Edit() should be compatible with that of CBase::Edit() in D:\xampp\htdocs\web\newpacific\include\newsletter.class.php on line 89
Strict Standards: Declaration of CLanguage::UpdateSEO() should be compatible with that of CBase::UpdateSEO() in D:\xampp\htdocs\web\newpacific\include\language.class.php on line 186
Strict Standards: Declaration of CNav::Save() should be compatible with that of CBase::Save() in D:\xampp\htdocs\web\newpacific\include\nav.class.php on line 178
Strict Standards: Declaration of CNav::Edit() should be compatible with that of CBase::Edit() in D:\xampp\htdocs\web\newpacific\include\nav.class.php on line 178
Strict Standards: Declaration of CDatabase::GetAll() should be compatible with that of CBase::GetAll() in D:\xampp\htdocs\web\newpacific\include\database.class.php on line 119
Strict Standards: Declaration of CNews::GetMaxOrder() should be compatible with that of CBase::GetMaxOrder() in D:\xampp\htdocs\web\newpacific\include\news.class.php on line 160
Strict Standards: Declaration of CNews::UpdateOrder() should be compatible with that of CBase::UpdateOrder() in D:\xampp\htdocs\web\newpacific\include\news.class.php on line 160
Strict Standards: Declaration of CNavigation::GetMaxOrder() should be compatible with that of CBase::GetMaxOrder() in D:\xampp\htdocs\web\newpacific\include\navigation.class.php on line 75
Strict Standards: Declaration of CNavigation::UpdateOrder() should be compatible with that of CBase::UpdateOrder() in D:\xampp\htdocs\web\newpacific\include\navigation.class.php on line 75
Strict Standards: Declaration of CArticle::GetMaxOrder() should be compatible with that of CBase::GetMaxOrder() in D:\xampp\htdocs\web\newpacific\include\article.class.php on line 117
Thanks in advance. I searched in the forum. didnt figure out why it still getting strict standard errors
Tested it out on xampp (didn't have it, so just wanted to see) and setting " error_reporting = E_ALL & ~E_DEPRECATED
" in php.ini gets rid of that strict warning. Remember to restart server (and comment the lines that you uncommented) for it to take effect.
Also, you can also make sure that the functions are meeting the standards as well. Something I found online:
class ParentClass
{
protected static function foo($param1, $param2)
{
echo "Parent\n";
}
}
class ChildClass extends ParentClass
{
public static function foo($param1)
{
parent::foo($param1, 2);
echo "Child\n";
}
}
ChildClass::foo(1);
This triggers a standard, because foo doesn't match the other foo, but you can simply put:
public static function foo($param1, $param2=2)
{
parent::foo($param1, 2);
echo "Child\n";
}
and either use $param2 or ignore it to get rid of the warning, but if taken, I would use it...
@craniumonempty I renamed php.ini into other name, then renamed php.ini-development file into php.ini Now no errors anymore. Hope This could help someone
Or change error_reporting into error_reporting = E_ALL & ~E_NOTICE & ~E_DEPRECATED
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.