/** * Return whether or not our achievement data is valid. * * It appears that sometimes the api will return incorrect data for the achievements of a * character. We now make sure to check before attempting any procession on that data. * @return boolean */ private function _has_valid_achievement_data() { if (is_array($this->achievements->achievementsCompleted) && is_array($this->achievements->achievementsCompletedTimestamp)) { return true; } WoW_Armory_Character_DAL::persist_character_note($this, __('The achievement data for this character is not fully formed.', 'wow_armory_character')); return false; }