|  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
 [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;


Add a Patch

Pull Requests

Add a Pull Request


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: Wed Apr 24 18:01:28 2024 UTC