Fix PHP 8.1 E_DEPRECATED issue when the page has no output.

Signed-off-by: Bruno Moreira <bruno@terraduo.com>