MINOR: check if $data['publish'] isset (fixes #3)