From: skodak Date: Tue, 4 Mar 2008 09:24:04 +0000 (+0000) Subject: MDL-13762 some debug code and workaround for sloppy use of recordsets; merged from... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=2516a42ad1aa251b07ad0fe292385cfbecff75d0;p=moodle.git MDL-13762 some debug code and workaround for sloppy use of recordsets; merged from MOODLE_19_STABLE --- diff --git a/lib/dmllib.php b/lib/dmllib.php index eae308b0d4..739bce243b 100644 --- a/lib/dmllib.php +++ b/lib/dmllib.php @@ -816,6 +816,11 @@ function rs_fetch_next_record(&$rs) { global $CFG; + if (empty($rs)) { + debugging('Incorrect rs used!'); + return false; + } + $rec = false; $recarr = $rs->FetchRow(); //Retrieve record as object without advance the pointer. It's quicker that FetchNextObj()