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
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: jon at clearink dot com
New email:
PHP Version: OS:

 

 [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: Sat Dec 21 14:01:32 2024 UTC