Bug fix; check if `$fields` isset; i.e. E_NOTICE compat.