From: [EMAIL PROTECTED]
Operating system: Linux
PHP version: 4.2.3
PHP Bug Type: Scripting Engine problem
Bug description: When initialising an undeclared instance variable no error is shown
When I call a method that initializes a instance variable that isn't
declared, php doen's complain. I see this as a bug, because when I
mis-spelled an instance variabele some strange things happen. Because when
I trie to get the value of an instance variabele, I get the
old/unitialized value.
Here is some sample code:
<?
class apple
{
var $color;
function fruit($new_color) {
$this->color = $new_color;
}
function set_taste($new_taste) {
$this->taste = $new_taste;
}
}
$green_apple = new apple('green');
$green_apple->set_taste('good');
?>
--
Edit bug report at http://bugs.php.net/?id=21008&edit=1
--
Try a CVS snapshot: http://bugs.php.net/fix.php?id=21008&r=trysnapshot
Fixed in CVS: http://bugs.php.net/fix.php?id=21008&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=21008&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=21008&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=21008&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=21008&r=support
Expected behavior: http://bugs.php.net/fix.php?id=21008&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=21008&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=21008&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=21008&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=21008&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=21008&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=21008&r=isapi