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 Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or 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

Add a Patch

Pull Requests

Add a Pull Request

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-2021 The PHP Group
All rights reserved.
Last updated: Wed Dec 01 03:03:40 2021 UTC