Home » Authentication » Auth » Bug #1897
Error in login because of bad string check..
Details
| Submitted | 2004-07-16 23:13 UTC |
|---|---|
| From | herojoker at nexgo dot de |
| Assigned | yavo |
| Status | Closed |
| Package | Auth |
| PHP Version | 5.0.0 |
| OS | Not important |
| Roadmaps | (Not assigned) |
Comments
[2004-07-16 23:13 UTC] herojoker at nexgo dot de
Description:
------------
Hello!
I am using Auth 1.2.3.
I changed my PHP Version to 5.0.0.
Now the login does not work anymore, but I already found a solution.
In Auth/Container/DB.php in line 96 is a check, whether get_parent_class($dsn) is equal to "db_common".
An "echo get_parent_class($dsn)" returns (without the "") "DB_common", but the expression (get_parent_class($dsn) == "db_common") evaluates to the boolean false!
I changed it to (get_parent_class($dsn) == "DB_common") and now the login works!
Perhaps this helps you with your development of Auth (good package!).
It would be nice if you answer me (via email or ICQ 177836223).
Hero Wanders
Reproduce code:
---------------
if (...) {
...
} elseif (get_parent_class($dsn) == "db_common") {
$this->db = $dsn;
}
Expected result:
----------------
$this->db should be $dsn after the posted elseif statement.
Actual result:
--------------
$this->db is not $dsn after the posted elseif statement.
$this->db is not changed in the method _connect().
[2004-07-16 23:27 UTC] herojoker at nexgo dot de
The "error" occures due to the new behaviour of the method get_class().
From www [dot] zend [dot] com:
"get_class() starting, PHP 5 returns the name of the class as it was declared which may lead to problems in older scripts that rely on the previous behaviour (the class name was lowercased). A possible solution is to search for get_class() in all your scripts and use strtolower()."
Hope that helps,
Hero Wanders