mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
MDL-29894 forbid objects in DML parameters
Objects with __toString we never fully supported as parameters in DML layer, this finally brings consistent behaviour.
This commit is contained in:
parent
a2b30aa852
commit
e618cdf3f6
8 changed files with 156 additions and 4 deletions
|
@ -579,6 +579,8 @@ class sqlsrv_native_moodle_database extends moodle_database {
|
|||
* @return mixed the normalised value
|
||||
*/
|
||||
protected function normalise_value($column, $value) {
|
||||
$this->detect_objects($value);
|
||||
|
||||
if (is_bool($value)) { /// Always, convert boolean to int
|
||||
$value = (int)$value;
|
||||
} // And continue processing because text columns with numeric info need special handling below
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue