Merge "Fix regular expression"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Wed, 19 Dec 2018 12:35:52 +0000 (12:35 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Wed, 19 Dec 2018 12:35:52 +0000 (12:35 +0000)
includes/libs/rdbms/field/SQLiteField.php

index 39f8f01..fdf96fe 100644 (file)
@@ -21,8 +21,8 @@ class SQLiteField implements Field {
        function defaultValue() {
                if ( is_string( $this->info->dflt_value ) ) {
                        // Typically quoted
-                       if ( preg_match( '/^\'(.*)\'$', $this->info->dflt_value ) ) {
-                               return str_replace( "''", "'", $this->info->dflt_value );
+                       if ( preg_match( '/^\'(.*)\'$/', $this->info->dflt_value, $matches ) ) {
+                               return str_replace( "''", "'", $matches[1] );
                        }
                }