Fix potential empty activity ID being set during digests.

See https://wordpress.org/support/topic/wordpress-database-error-misplaced-comma

Props @tomdxw