imagecreatefromstring() error handling