]> git.mjollnir.org Git - moodle.git/commitdiff
Missing parenthesis in sql_substr(). MDL-16669
authorstronk7 <stronk7>
Tue, 28 Oct 2008 17:57:51 +0000 (17:57 +0000)
committerstronk7 <stronk7>
Tue, 28 Oct 2008 17:57:51 +0000 (17:57 +0000)
lib/dml/moodle_database.php

index 46bfb3735cf82796587035c03895f2c3a72ebeea..6cea81570bcaae1a23d2b0048dcc42be5123ec67 100644 (file)
@@ -1410,7 +1410,7 @@ abstract class moodle_database {
             throw new coding_exception('moodle_database::sql_substr() requires at least two parameters', 'Originaly this function was only returning name of SQL substring function, it now requires all parameters.');
         }
         if ($length === false) {
-            return "SUBSTR($expr, $start";
+            return "SUBSTR($expr, $start)";
         } else {
             return "SUBSTR($expr, $start, $length)";
         }