|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-11-04 11:10 UTC] tony2001@php.net
[2004-11-14 01:00 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Nov 06 14:00:01 2025 UTC |
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