Home » HTTP » HTTP_Session » Bug #6778
DB container problem
Details
| Submitted | 2006-02-14 10:42 UTC |
|---|---|
| From | ag at people dot pl |
| Assigned | troehr |
| Status | Closed |
| Package | HTTP_Session |
| PHP Version | 5.1.1 |
| OS | Linux |
| Roadmaps | (Not assigned) |
Comments
[2006-02-14 10:42 UTC] ag at people dot pl
Description:
------------
Hello,
I have just been starting to change the container (cookie -> db) and I have noticed some error there... When I tried to implement that I saw some error message like this:
Fatal error: Call to a member function quoteSmart() on a non-object in /srv/php/lib/php/HTTP/Session/Container/DB.php on line 179 (Strange error, google doesn't know it!)
I traced this problem and saw there is a little bug at _connect function. You assume 'dsn' is a string with db options. But it could be array too, with the same options (i.e.: http://pear.php.net/manual/en/package.database.db.intro-connect.php).
I suggest to change line 115 of this file
if (is_string($dsn)) {
into:
if (is_string($dsn) || (is_array($dsn)) {