From: skodak Date: Sun, 16 Mar 2008 22:08:14 +0000 (+0000) Subject: MDL-13944 rs_close() does not throw fatal error if rs does not exist aynmore; merged... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=600fe3b33343ef63856c61e223fd841d8a3d3736;p=moodle.git MDL-13944 rs_close() does not throw fatal error if rs does not exist aynmore; merged from MOODLE_19_STABLE --- 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(); }