From 600fe3b33343ef63856c61e223fd841d8a3d3736 Mon Sep 17 00:00:00 2001 From: skodak Date: Sun, 16 Mar 2008 22:08:14 +0000 Subject: [PATCH] MDL-13944 rs_close() does not throw fatal error if rs does not exist aynmore; merged from MOODLE_19_STABLE --- lib/dmllib.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/dmllib.php b/lib/dmllib.php index 739bce243b..25861e11af 100644 --- a/lib/dmllib.php +++ b/lib/dmllib.php @@ -853,8 +853,13 @@ function rs_EOF($rs) { * Note that, once closed, the recordset must not be used anymore along the request. * Saves memory (optional but recommended). * @param ADORecordSet the recordset to be closed + * @return void */ function rs_close(&$rs) { + if (!$rs) { + // recordset not open, hmmm + return; + } $rs->Close(); } -- 2.39.5