php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #60 class problem
Submitted: 1998-02-12 00:10 UTC Modified: 1998-02-12 00:17 UTC
From: jon at clearink dot com Assigned:
Status: Closed Package: Other
PHP Version: 3.0b4 OS: solaris
Private report: No CVE-ID: None
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
31 + 11 = ?
Subscribe to this entry?

 
 [1998-02-12 00:10 UTC] jon at clearink dot com
if "$theDb" is really named "$db", things do not work...thus renaming $db to $theDb is required
var $db never gets set properly.

shouldn't using $db as the variable name in setDB work (ie: the $db in setDB is different than var $db)?


	class DatabaseManager
	{
		var $db;
		
		function getDB()
		{
			return $this->$db;
		}
		
		function setDB( $theDb )
		{
			$this->$db = $theDb;
		}
	};

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1998-02-12 00:17 UTC] rasmus
Typo in script, not a bug.

   $this->$db should be $this->db
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 12 07:01:28 2024 UTC