Remove notice caused by undefined index.

#5293