fix notice for missing array index #1925

#1925