This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 216258 - Hint for access on Nonexisting attributes
Summary: Hint for access on Nonexisting attributes
Status: NEW
Alias: None
Product: php
Classification: Unclassified
Component: Editor (show other bugs)
Version: 7.3
Hardware: PC Linux
: P3 normal (vote)
Assignee: Ondrej Brejla
Depends on:
Reported: 2012-08-01 14:02 UTC by wegus
Modified: 2012-08-01 14:03 UTC (History)
0 users

See Also:
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description wegus 2012-08-01 14:02:15 UTC
i would like to suggest an PHP-Editor hint Feature on accessing nonexistant Class-Attributes!

I recently stumbled uppon an error written by myself like this:

foreach($liste as $item) {
  if ($item->fogleStatus && $item->folgeStatus>100) {
    // do something

As you might see i had a Typo (foglestatus and folgestatus) within the if-condition!

I know that PHP is a dynamic language and that it is a feature of PHP to add and remove Attributes if necessary. But if you do work correct and clear object orientated and you do use things like composition and traits, you might avoid such dynamic changes and one might want to see a warning when accessing Object Attributes that are not defined! You don't get an error, as it is allowed to write such code.

I would appreciate to see such a hint. I do make intensive use of code completion, but most of my severe typos are bugs like the one above that could easily avoided by such an hint!

what do you guys think?