Updated script to use safe array access instead of hiding notices