#21008 [Com]: When initialising an undeclared instance variable no error is shown

2002-12-14 Thread jan_willem_maarse
 ID:   21008
 Comment by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Won\'t fix
 Bug Type: Scripting Engine problem
 Operating System: Linux
 PHP Version:  4.2.3
 New Comment:

hmm... when is php going to support OO then? They say OO programming is
supported, but I have my thoughts about this.


Previous Comments:


[2002-12-14 06:07:00] [EMAIL PROTECTED]

Not a bug at all, you don't need to declare any variable in PHP,
nowhere. Adding an error for this will break tons of scripts, so we're
not going to add it.



[2002-12-14 06:03:29] [EMAIL PROTECTED]

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:

color = $new_color;
   }

   function set_taste($new_taste) {
  $this->taste = $new_taste;
   }
}

$green_apple = new apple('green');

$green_apple->set_taste('good');

?>




-- 
Edit this bug report at http://bugs.php.net/?id=21008&edit=1




#21008 [NEW]: When initialising an undeclared instance variable no error is shown

2002-12-14 Thread jan_willem_maarse
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:

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