Posted by catofcheshir on March 16, 2009 at 12:13pm
| Project: | Radioactivity |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Issue Summary
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.
Comments
#1
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.#2
Actually, AFAICT, those aren't really even warnings but just notices.
#3
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.
#4
OK, found one more of these, fix committed. Marking this issue as fixed for now.
#5
Still one more of these fixed and committed.
#6
Automatically closed -- issue fixed for 2 weeks with no activity.
#7
Line 108 of radioactivity.inc - Looks like this issue still exists in some places. See the following which generates this error:
<?php// 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;
}
}
}
?>
#8
Attached is a patch to check for the existence of subclasses before they are accessed (see comment 7 above).
Thanks,
-mike