Do not crash if next()
is called without arguments
#7831
Merged
next()
is called without arguments
#7831