Shiroyuki Shiroyuki - 1 year ago 67
PHP Question

How to get a static function into a non static funtion?

Well Hello,
my problem is that i get this message when i register my account. (It works but that little message is a abit ugly.)
I'm not really familar with static and non static so I'd like to ask how to get this

$password = Password::encode($password);
(line 76)
into a non static version.
Thank you

Answer Source

This warning what you got means that encode is not a static method. It should be called more like this:

$pass = new Password();
$password = $pass->encode($password);

Static function looks like follows:

private static function encode($pass) { 

Non static looks like this:

private function encode($pass) { 

More informations can be found here

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download