From 2516a42ad1aa251b07ad0fe292385cfbecff75d0 Mon Sep 17 00:00:00 2001 From: skodak Date: Tue, 4 Mar 2008 09:24:04 +0000 Subject: [PATCH] MDL-13762 some debug code and workaround for sloppy use of recordsets; 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 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() -- 2.39.5