ID: 30582 Updated by: [EMAIL PROTECTED] Reported By: jj at archit dot uni-karlsruhe dot de -Status: Open +Status: Feedback Bug Type: Class/Object related Operating System: Debian Woody R3 PHP Version: 4.3.9 New Comment:
Thank you for this bug report. To properly diagnose the problem, we need a short but complete example script to be able to reproduce this bug ourselves. A proper reproducing script starts with <?php and ends with ?>, is max. 10-20 lines long and does not require any external resources such as databases, etc. If possible, make the script source available online and provide an URL to it here. Try avoid embedding huge scripts into the report. Previous Comments: ------------------------------------------------------------------------ [2004-10-27 14:19:27] jj at archit dot uni-karlsruhe dot de Description: ------------ When trying to call a static method from within another static method in the same class, PHP fails and prints "Problem with method call - please report this bug". However, in a couple of other methods, this does work. I have no clue, why it doesn't work in this particular function, though. Reproduce code: --------------- function _getAuthType( ) { if ( strstr( $_POST["username"], "tmp_" ) || (isset( $_SESSION["wahl"] ) && strstr( $_SESSION["wahl"] -> username, "tmp_" ) ) ) { return "DB"; } else { return "LDAP"; } } /* end of getAuthType */ function getAuthOpts( ) { $this -> authOpts = array( "DB" => array("dsn" => DB_DRIVER."://".STUD_DB_USER.":".STUD_DB_PASS."@".STUD_DB_HOST."/".STUD_DB_NAME, "cryptType"=> "none", "table" => "studis", "usernamecol" => "login", "passwordcol" => "matrikelnr" ), "LDAP" => array( "host"=> "ldaps://<host>", "port"=> 636, "basedn"=> "<dn>", "userattr"=> "uid" ) ); $authType = WahlApplication::_getAuthType( ); return $this -> authOpts[ $authType ]; } Expected result: ---------------- $authType should contain a string - either "DB" or "LDAP" Actual result: -------------- Warning: Problem with method call - please report this bug in /home/www/arch/studwahl-test/inc/base_classes.php on line 76 Fatal error: Call to a member function on a non-object in /home/www/arch/studwahl-test/inc/base_classes.php on line 88 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=30582&edit=1