Prevent division by zero in the back end pagination menu (see #6923)