MDL-47649 csvlib: must not leave files open
authorTim Hunt <T.J.Hunt@open.ac.uk>
Mon, 13 Oct 2014 15:32:48 +0000 (16:32 +0100)
committerTim Hunt <T.J.Hunt@open.ac.uk>
Tue, 14 Oct 2014 09:36:25 +0000 (10:36 +0100)
commita866538b9b63562a1dc6fd80a6e7d1a7ad6b5c93
treedf038495f04fa358c33632efd867819aa84a78d4
parentd3ff82257e91d7d4157f16d53d63cf45e4253309
MDL-47649 csvlib: must not leave files open

I added a destructor to csv_import_reader ensure the file is closed.

I also ensured that the gradeimport_csv unit tests did not hold onto a
reference to the csv_import_reader object while the phpunit framework
tries to tidy up moodledata.

Finally, to stop CiBoT complaining, I fixed up the PHP4-style
declarations in the CSV import class.
grade/import/csv/tests/load_data_test.php
lib/csvlib.class.php