Followup to issue #2032427 by WebSinPat: Fixed PHP error notice when links array is empty.