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:
Petr Skoda 2012-03-17 18:42:30 +01:00
parent a2b30aa852
commit e618cdf3f6
8 changed files with 156 additions and 4 deletions

View file

@ -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;