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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
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 17:01:58 2024 UTC