|  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
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
46 - 45 = ?
Subscribe to this entry?

 [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-2024 The PHP Group
All rights reserved.
Last updated: Sun Jun 16 12:01:28 2024 UTC