/** * Validates the object right after it was loaded/initialized. * * We ensure that the custom_data field is an array. * * @since 1.0.0 */ public function prepare_obj() { parent::prepare_obj(); if (!is_array($this->custom_data)) { $this->custom_data = array(); } }