[BUGFIX] DataHandler::log() must not return NULL

Ensure the DataHandler::log() function does return integers
in all cases as denoted in the doc header.

Resolves: #59185
Releases: 6.2, 6.1, 6.0
Change-Id: I2a6aa0415b7cc19f10b4a290e43bd20065e6c9e1
Reviewed-on: https://review.typo3.org/30479
Reviewed-by: Stefan Neufeind
Tested-by: Stefan Neufeind
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters