fixed the error when count($lines) == 0 in getBody method. The break in the code leads to error "undefined variable  $firstLine".