Permalink
Browse files

MDL-12158 Applied Matt's patch, merging from 1.6

  • Loading branch information...
1 parent 84620a0 commit 85ca3686cb5a18ee04e11ada6b67ed7c64501630 nicolasconnault committed Feb 5, 2008
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/dmllib.php
View
@@ -353,7 +353,7 @@ function count_records_select($table, $select='', $countitem='COUNT(*)') {
function count_records_sql($sql) {
$rs = get_recordset_sql($sql);
- if ($rs) {
+ if (is_object($rs) and is_array($rs->fields)) {
return reset($rs->fields);
} else {
return 0;

0 comments on commit 85ca368

Please sign in to comment.