It's enough to use error_get_last to obtain the message without need to
play with PHP configuration and error handling.
The only tricky thing is to know that there is new error. With PHP 7,
there is error_clear_last() which ensures this, on older PHP we need to
trigger *another* error to be able to detect that new error comes.
Signed-off-by: Michal Čihař <michal@cihar.com>
We can not trust the input here, so we can expect anything and deal with
missing parameters or invalid values.
Signed-off-by: Michal Čihař <michal@cihar.com>