database MDL-24863 applied fix like MDL-23997 which converts number to string.
authorAparup Banerjee <nebgor@gmail.com>
Wed, 17 Nov 2010 07:36:02 +0000 (07:36 +0000)
committerAparup Banerjee <nebgor@gmail.com>
Wed, 17 Nov 2010 07:36:02 +0000 (07:36 +0000)
lib/dml/mssql_native_moodle_database.php

index f0e921f..d812311 100644 (file)
@@ -622,7 +622,7 @@ class mssql_native_moodle_database extends moodle_database {
                 $return .= 'NULL';
 
             } else if (is_number($param)) { // we can not use is_numeric() because it eats leading zeros from strings like 0045646
-                $return .= $param;
+                $return .= "'".$param."'"; //fix for MDL-24863 to prevent auto-cast to int.
 
             } else if (is_float($param)) {
                 $return .= $param;