Checking line[0] exists

Fixes PHP Notice:  Undefined offset: 0 in ...
Merge pull request #1 from urmaul/patch-1

Checking line[0] exists