fix getListeners

Update to fix issue where PHP NOTICE was thrown and no callback returned.