Sec Bug->Bug #64203 [Opn->Nab]: private property of class modified by mysql_fetch_object
| From: | johannes@php.net | Date: | Wed, 13 Feb 2013 14:24:03 +0000 |
| Subject: | Sec Bug->Bug #64203 [Opn->Nab]: private property of class modified by mysql_fetch_object | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-176601@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=64203&edit=1
ID: 64203
Updated by: johannes@php.net
Reported by: pelister dot 79 at gmail dot com
Summary: private property of class modified by
mysql_fetch_object
-Status: Open
+Status: Not a bug
-Type: Security
+Type: Bug
Package: MySQL related
Operating System: Win XP
PHP Version: 5.4.11
Block user comment: N
Private report: N
New Comment:
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
Previous Comments:
------------------------------------------------------------------------
[2013-02-13 11:50:01] pajoye@php.net
change mode and category for this report.
------------------------------------------------------------------------
[2013-02-13 10:35:07] pelister dot 79 at gmail dot com
Description:
------------
---
From manual page: http://www.php.net/function.mysql-fetch-object#refsect1-function.mysql-fetch-object-notes
---
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"))
$row->display();
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=64203&edit=1