1
0
mirror of https://github.com/danog/psalm.git synced 2025-01-21 21:31:13 +01:00

Fix possible reference error if interface name is bad

This commit is contained in:
Matthew Brown 2016-09-15 16:30:18 -04:00
parent 6027687ad9
commit 55fc146c57

View File

@ -261,7 +261,9 @@ abstract class ClassLikeChecker implements StatementsSource
}
foreach (ClassChecker::getInterfacesForClass($this->absolute_class) as $interface_id => $interface_name) {
self::$public_class_constants[$this->absolute_class] += self::$public_class_constants[$interface_name];
if (isset(self::$public_class_constants[$interface_name])) {
self::$public_class_constants[$this->absolute_class] += self::$public_class_constants[$interface_name];
}
}
}