Restler icon indicating copy to clipboard operation
Restler copied to clipboard

Undefined index in EventDispatcher, line 47

Open shaneneuerburg opened this issue 10 years ago • 1 comments

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.

shaneneuerburg avatar Jan 25 '16 04:01 shaneneuerburg

It had been fixed in https://github.com/Luracast/Restler/pull/574/commits/25203d622cebf83052cf9701fc02a5df200fb521

linux019 avatar Jun 08 '17 10:06 linux019