Edit report at https://bugs.php.net/bug.php?id=64203&edit=1
ID: 64203 Updated by: [email protected] 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] [email protected] 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
