Hate Posted September 17, 2010 Share Posted September 17, 2010 Hi, I have two classes and there's no real reason to join them when I only need to access one function, so I'm just calling a function statically from my second class and I'm getting this error: Strict Standards: Non-static method unnamed::kpResults() should not be called statically, assuming $this from incompatible context in /test/objects/thread.class.php on line 27 The script actually works, but I still get that error with the Strict Standards. What do I do? Link to comment https://forums.phpfreaks.com/topic/213661-php-error/ Share on other sites More sharing options...
rwwd Posted September 17, 2010 Share Posted September 17, 2010 Well you could call the function static then you wouldn't get that error at all... This is assuming as you are accessing it like this:- if(!ClassName::YourFunction('params')){ //case true } else{ //case false } Either that, or just put the error_reporting(E_ALL) and not E_ALL|E_STRICT That's just a work around though.. Rw Link to comment https://forums.phpfreaks.com/topic/213661-php-error/#findComment-1112078 Share on other sites More sharing options...
rwwd Posted September 17, 2010 Share Posted September 17, 2010 true || false ? Link to comment https://forums.phpfreaks.com/topic/213661-php-error/#findComment-1112085 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.