* @throws \Exception
* @todo Let's get rid of boolean type of $old_fields
*/
- public static function update(array $fields, array $condition, $old_fields = [])
+ public static function update(array $fields, array $condition, $old_fields = []): bool
{
- $fields = DI::dbaDefinition()->truncateFieldsForTable('contact', $fields);
- $ret = DBA::update('contact', $fields, $condition, $old_fields);
-
// Apply changes to the "user-contact" table on dedicated fields
Contact\User::updateByContactUpdate($fields, $condition);
- return $ret;
+ $fields = DI::dbaDefinition()->truncateFieldsForTable('contact', $fields);
+ return DBA::update('contact', $fields, $condition, $old_fields);
}
/**