This line throws a fatal error for me on WP 4.7.2; I keep correcting it but every update breaks it again.
Current line:
$wpdb->query($wpdb->prepare(" update $table_name set redirect_from=%s,redirect_to=%s where ID=%d"),$redirect_from,$redirect_to,$ID );
Fixed line:
$wpdb->query($wpdb->prepare(" update $table_name set redirect_from=%s,redirect_to=%s where ID=%d",$redirect_from,$redirect_to,$ID));