Modify ↓
Ticket #37 (closed defect: fixed)
PHPUnit2Util::getDefinedClasses
| Reported by: | elias@… | Owned by: | mrook |
|---|---|---|---|
| Priority: | low | Milestone: | 2.2.0 |
| Component: | Version: | 2.2.0RC2 | |
| Keywords: | Cc: |
Description
PHPUnit2Util::getDefinedClasses issues a notice:
[PHP Error] Undefined index: ... [line 111 of /usr/share/pear/phing/tasks/ext/phpunit2/PHPUnit2Util.php]
Line 111 should be replaced with:
$declaredClasses = array_merge(get_declared_interfaces(), get_declared_classes());
Attachments
Change History
Note: See
TracTickets for help on using
tickets.

I agree with your bugreport, but not with your proposed solution. The method getDefinedClasses() does not (and should not) care about interfaces.
A better solution (one which I would commit) would be:
if (is_array(self::$definedClasses[$filename])) { return self::$definedClasses[$filename]; } else { return array(); }