(bug 56669) fix failure when $links = array() and $params = null

Change-Id: I5975d193f192ca0746c30ce998a29206412b403b