mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
MDL-59173 tablelib.php: changed default of $params in set_sql to array()
Default of $params = null leads to a problem in query_db(). There this value is used in array_merge, which can not handle null values. If null is passed for one of the params the outcome will be null independent of the value of the second param!
This commit is contained in:
parent
6bb80a1917
commit
4acb33f67b
@ -1545,7 +1545,7 @@ class table_sql extends flexible_table {
|
||||
* Of course you can use sub-queries, JOINS etc. by putting them in the
|
||||
* appropriate clause of the query.
|
||||
*/
|
||||
function set_sql($fields, $from, $where, array $params = NULL) {
|
||||
function set_sql($fields, $from, $where, array $params = array()) {
|
||||
$this->sql = new stdClass();
|
||||
$this->sql->fields = $fields;
|
||||
$this->sql->from = $from;
|
||||
|
Loading…
x
Reference in New Issue
Block a user