7. Any person released on supervised probation under section 5 who infringes the conditions of the order shall, after the court has heard him or given him an opportunity to be heard, be liable to the punishment which might have been imposed upon him if the passing of the whole or part of the sentence had not been suspended, unless the court decides to change the order in accordance with section 6.