[Bug Report] ImageSet event without index/total make Undefined index access
Bug Report
Describe the bug Inspite of the official docs says that imageSet.id, imageSet.index and imageSet.total are Only included when multiple images are sent simultaneously, messages with imageSet.id without index and total sometimes come from webhook.
It makes undefined index access like "Undefined index: index on 35 in /linebot/vendor/linecorp/line-bot-sdk/src/LINEBot/Event/MessageEvent/ImageMessasge/ImageSet.php ".
https://developers.line.biz/en/reference/messaging-api/#wh-image:~:text=images%20sent%20simultaneously.-,Only%20included%20when%20multiple%20images%20are%20sent%20simultaneously.,-However%2C%20it%20won%27t
messages json like
{"type":"image","id":"************","contentProvider":{"type":"line"},"imageSet":{"id":"************"}}
To Reproduce It looks "one-image multiple images" make that event, however I don't know how to make that event.
Environment (please complete the following information):
- line-bot-sdk-php version 7.3.0
The official docs says that imageSet.index and imageSet.total won't be included if the sender is using LINE 11.15 or earlier for Android. https://developers.line.biz/en/reference/messaging-api/#message-event
We encountered similar situation in our environment.
It seems LINEBot#parseEventRequest($body, $signature) fails when this bug occurs,
then we cannot return 200 response to the webhook request.
Since we enabled webhook redelivery of the Messaging API,
https://developers.line.biz/en/docs/messaging-api/receiving-messages/#webhook-redelivery
our non-200 response cause message re-delivery. Consequently the same error occurs. This is the unnecessary load not only for us, but also for LINE's servers. Please fix it asap. Your prompt action is very much appreciated.
Sorry to reply you too late. I fixed this bug with #410