This error consistently occurs with the latest version of Moodle 2.4.
Using postgres 9.1
SELECT * FROM mdl_assign WHERE course=$1 AND (0 OR name LIKE $2 OR intro LIKE $3)
[array (
0 => 1,
1 => '%test%',
2 => '%test%',
)]
Stack trace:
line 426 of /lib/dml/moodle_database.php: dml_read_exception thrown
line 248 of /lib/dml/pgsql_native_moodle_database.php: call to moodle_database->query_end()
line 753 of /lib/dml/pgsql_native_moodle_database.php: call to pgsql_native_moodle_database->query_end()
line 72 of /blocks/course_search/lib.php: call to pgsql_native_moodle_database->get_records_sql()
line 60 of /blocks/course_search/results.php: call to block_course_search_search_module()
$ret = '';
- $sqlWere = 'course=? AND (0';
+ $sqlWere = 'course=? AND (false';
$sqlParams = array($courseid);
//At least one search field is needed
$onefield = false;