ID: 34694 Updated by: [EMAIL PROTECTED] Reported By: kropeck at interia dot pl -Status: Open +Status: Bogus Bug Type: Variables related Operating System: Win XP PHP Version: 5.0.5 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 Properties are written in this way: $this->prop without the "$" at the beginning. Previous Comments: ------------------------------------------------------------------------ [2005-09-30 22:16:42] kropeck at interia dot pl Description: ------------ I have a class, where are few variables: function DrawSelectList($list_name, $key1, $key2=false) and there is a class which calls my function. If there are 3 variables: $result = $class1 -> DrawSelectList($arg1, $arg2, $arg3) there is no problem, but if I pass two arguments only, there is a problem: PHP Fatal error: Cannot access empty property in C:\project\ast\utility\SelectList.php on line 29 the code of 'SelectList.php' looks like this: (...) while($row = $dao->fetchObject()) { $this->arg1= $row->$key; $this->arg2= $row->$pole1; line 29 $this->arg3= $row->$pole2; $this->list= $list_name; (...) In PHP 5.0.4 it worked properly. Sorry for my english. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=34694&edit=1