#21021 [Fbk->Opn]: Cant find internal referened functions within a class

From: Date: Sun, 15 Dec 2002 00:37:16 +0000
Subject: #21021 [Fbk->Opn]: Cant find internal referened functions within a class
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-27734@lists.php.net to get a copy of this message
ID: 21021 User updated by: daniel@electroteque.org Reported By: daniel@electroteque.org -Status: Feedback +Status: Open Bug Type: Class/Object related Operating System: Redhat 8 PHP Version: 4.3.0RC3 New Comment: class auth { function login($username,$password){ $this->db = $GLOBALS['db']; echo $this->password = $this->_crypt($password); } //pass password :: private function _crypt($password){ return md5($password); } } use: auth::login("dan","bollox"); Previous Comments: ------------------------------------------------------------------------ [2002-12-14 18:14:49] derick@php.net Please trim down your code to the smallest possible script that shows the problem AND can be easily copied and pasted for us to test. Derick ------------------------------------------------------------------------ [2002-12-14 18:08:08] daniel@electroteque.org Since i have upgraded my entire class script is buggered up. Call to undefined function: _crypt() here is the snippets function login($username,$password,$remember,$page){ $this->db = $GLOBALS['db']; $this->password = $this->_crypt($password); $this->_check_username($username); $this->_check_password($username); $this->_is_confirmed($username); if ($this->username_result && $this->pass_result && $this->confirmed_result){ $this->_setSession($remember,true); redirect($page); //return true; } else // login/pass check failed { $this->logout($_SERVER['PHP_SELF'].$this->_build_errorquery($this->result)); } } //pass password :: private function _crypt($password){ return md5($password); } i cant honestly see what the reason for this is, i suggest its a bug , as my script was working before , what is even more wierd , my function was called _encrypt it wasnt working so i changed it to _crypt and it started working fine , i have reloaded my page today and its back to the same error. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=21021&edit=1

« previous php.bugs (#27734) next »