ValueError thrown
max(): Argument #1 ($value) must contain at least one element