Restler
Restler copied to clipboard
Undefined index in EventDispatcher, line 47
I added an onRespond listener that looks something like this:
Restler::addListener('onRespond', function () {
});
Once I did that, I started getting the following error:
Undefined index: onRespond at this point: https://github.com/Luracast/Restler/blob/master/vendor/Luracast/Restler/EventDispatcher.php#L47
Seems like is_array() should be replaced with isset(). If you still want to check for the array type, then do that as a second conditional. Either way, I'm not sure why the error is being thrown.
It had been fixed in https://github.com/Luracast/Restler/pull/574/commits/25203d622cebf83052cf9701fc02a5df200fb521