add key check to prevent PHP notice

This commit is contained in:
Nanolucas 2021-03-26 23:48:51 +01:00
parent b26da9a83b
commit 91ef36fa4c

View File

@ -893,6 +893,11 @@ class Contract
$eventLogData = [];
//if there's no data for this event, no need to proceed further
if (!array_key_exists($eventName, $this->events)) {
return $eventLogData;
}
//indexed and non-indexed event parameters must be treated separately
//indexed parameters are stored in the 'topics' array
//non-indexed parameters are stored in the 'data' value