Fix potential undefined variable in Scanner

A simple fix to ensure that $newData will never be undefined. I don't think I've seen any issues related to this yet.

@icewind1991 @karlitschek @DeepDiver1975