Add default options for the statuses.
Cut and paste error from upstream.
Verify the SSL information; Check and report possible errors
Protect the HTTP_RAW_POST_DATA as it can generate warnings.
Log when reusing data.
Echo the error in the template instead of directly from the backend.

Slightly more elegant, same result.