Moodle

Warning: reset() [function.reset]: Passed variable is not an array or object in /var/www/moodle/lib/dmllib.php on line 376

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.8.2, 2.0
  • Fix Version/s: 1.6.7, 1.7.5, 1.8.5, 1.9, 2.0
  • Component/s: Libraries
  • Labels:
    None
  • Database:
    Any
  • Affected Branches:
    MOODLE_18_STABLE, MOODLE_20_STABLE
  • Fixed Branches:
    MOODLE_16_STABLE, MOODLE_17_STABLE, MOODLE_18_STABLE, MOODLE_19_STABLE, MOODLE_20_STABLE

Description

Call count_records_sql() with a query that returns 0 results. $rs->fields is set to "false", so reset($rs->fields) produces the warning in the summary.

NB: In 2.0 from CVS, the line number is 382 instead of 376.

Activity

Hide
Martin Dougiamas added a comment -

Thanks, Matt!

It looks fine to me.

Nick, can you please check this in to 20, 1.9, 1.8, 1.7 and 1.6 (setting all merged flags as you go of course!)

Show
Martin Dougiamas added a comment - Thanks, Matt! It looks fine to me. Nick, can you please check this in to 20, 1.9, 1.8, 1.7 and 1.6 (setting all merged flags as you go of course!)
Hide
Nicolas Connault added a comment -

Patch applied to all versions (in 1.6, the file is datalib.php, not dmllib.php).

Show
Nicolas Connault added a comment - Patch applied to all versions (in 1.6, the file is datalib.php, not dmllib.php).

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: