|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #64203 private property of class modified by mysql_fetch_object
Submitted: 2013-02-13 10:35 UTC Modified: 2013-02-13 14:24 UTC
From: pelister dot 79 at gmail dot com Assigned:
Status: Not a bug Package: MySQL related
PHP Version: 5.4.11 OS: Win XP
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.
Block user comment
Status: Assign to:
Bug Type:
From: pelister dot 79 at gmail dot com
New email:
PHP Version: OS:


 [2013-02-13 10:35 UTC] pelister dot 79 at gmail dot com
From manual page:

Private properties are accessed and values set with mysql_fetch_object, Can private properties be accessed outside the class?

Test script:
class myclass {
	private $option_name;
	private $option_value;
	private $option_id;
	function __construct( ) {
			echo "Data Created <br />";
	function display( ) {
			echo "Name: $this->option_name, Value: $this->option_value, Id: $this->option_id <br />";

/* connect to db */ 
$query = "SELECT * FROM simpleuser_options";

while( $row = mysql_fetch_object( $result, "myclass"))


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2013-02-13 11:50 UTC]
change mode and category for this report.
 [2013-02-13 11:50 UTC]
-Package: mSQL related +Package: MySQL related
 [2013-02-13 14:24 UTC]
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at and the instructions on how to report
a bug at

 [2013-02-13 14:24 UTC]
-Status: Open +Status: Not a bug -Type: Security +Type: Bug
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Mon Feb 06 04:04:08 2023 UTC