Section 248(2) in The Code of Criminal Procedure, 1973
(2)Where, in any case under this Chapter, the Magistrate finds the accused guilty, but does not proceed in accordance with the provisions of Section 325 or Section 360, he shall, after hearing the accused on the question of sentence, pass sentence upon him according to law.