49. Suits by minors.- Where the petitioner is a minor, he or she shall sue by his or her next friend to be approved by the Court; and no petition presented by a minor under this Act shall be filed until the next friend has undertaken in writing to be answerable for costs. Such undertaking 1[ shall be filed in Court, and the next friend shall thereupon be liable in the same manner and to the same extent as if he were a plaintiff in an ordinary suit.