My log is full of notices like this:

[Mon Mar 16 12:29:11 2009] [error] [client 91.192.148.231] PHP Notice: Undefined index: subclasses in /home/cat/modules6/radioactivity/radioactivity.inc on line 99
[Mon Mar 16 12:29:11 2009] [error] [client 91.192.148.231] PHP Notice: Undefined index: subclasses in /home/cat/modules6/radioactivity/radioactivity.inc on line 124

Module works but this messages confusing me.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

skiminki’s picture

In this case, those are harmless, really, but can bloat your logs. This happens because some is_set() calls are missing to suppress those warnings. Anyways, if you run production server, you should probably bump up your PHP log level into warning-level. I'm going to fix this before next release.

skiminki’s picture

Actually, AFAICT, those aren't really even warnings but just notices.

greggles’s picture

Status: Active » Postponed (maintainer needs more info)

They are just notices and ideally should be cleaned up as part of the coding standards about E_ALL code, but are not necessarily a priority.

I looked at the current code and it seems that these problems have been solved. Marking "needs more info" to see if anyone else is still seeing this problem.

skiminki’s picture

Status: Postponed (maintainer needs more info) » Fixed

OK, found one more of these, fix committed. Marking this issue as fixed for now.

skiminki’s picture

Still one more of these fixed and committed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

webkenny’s picture

Version: 6.x-1.0 » 6.x-1.3
Status: Closed (fixed) » Active

Line 108 of radioactivity.inc - Looks like this issue still exists in some places. See the following which generates this error:

    // check if we need to resolve full classname
    if (is_array($decay_profile['energy'][$oclass]['subclasses'])) {
      foreach ($decay_profile['energy'][$oclass]['subclasses'] as $subsources) {
        if (isset($subsources[$source])) {
          // there is subclass specific energy value for the source, so
          // resolve subclass
          $classname=_radioactivity_resolve_classname($oid, $oclass);
          break;
        }
      }
    }
ultimike’s picture

Version: 6.x-1.3 » 6.x-1.x-dev
FileSize
1.21 KB

Attached is a patch to check for the existence of subclasses before they are accessed (see comment 7 above).

Thanks,
-mike

the_g_bomb’s picture

Status: Active » Needs review

Confirmed this patch works and clears up the errors.

Sutharsan’s picture

Issue summary: View changes
Status: Needs review » Closed (outdated)

Issue triage: Closing issue, the 6.x branch is no longer maintained.

If you believe this issue is closed in error, feel free to re-open.