mirror of
https://github.com/moodle/moodle.git
synced 2025-08-08 10:26:40 +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
|
@ -651,6 +651,8 @@ class mysqli_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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue