Issue Details (XML | Word | Printable)

Key: MDL-12158
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Minor Minor
Assignee: Nicolas Connault
Reporter: Matt Oquist
Votes: 0
Watchers: 0
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Moodle

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

Created: 14/Nov/07 05:33 AM   Updated: 05/Feb/08 07:40 PM
Return to search
Component/s: Lib
Affects Version/s: 1.8.2, 2.0
Fix Version/s: 1.6.7, 1.7.5, 1.8.5, 1.9, 2.0

File Attachments: 1. Text File dmllib.php.patch (0.5 kB)


Database: Any
Participants: Martin Dougiamas, Matt Oquist and Nicolas Connault
Security Level: None
Resolved date: 05/Feb/08
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  « Hide
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.

 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Martin Dougiamas added a comment - 19/Dec/07 02:44 PM
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!)


Nicolas Connault added a comment - 05/Feb/08 07:40 PM
Patch applied to all versions (in 1.6, the file is datalib.php, not dmllib.php).