dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ea13092
)
Fix regular expression
author
Jakub Vrana
<jakub@vrana.cz>
Sat, 1 Dec 2018 08:55:29 +0000
(09:55 +0100)
committer
Thiemo Kreuz
<thiemo.kreuz@wikimedia.de>
Mon, 3 Dec 2018 17:49:23 +0000
(18:49 +0100)
Found by PHPStan.
Change-Id: I95813b0db9a3d6ca8c3894e5ccba00a9dc84b336
includes/libs/rdbms/field/SQLiteField.php
patch
|
blob
|
history
diff --git
a/includes/libs/rdbms/field/SQLiteField.php
b/includes/libs/rdbms/field/SQLiteField.php
index
39f8f01
..
fdf96fe
100644
(file)
--- a/
includes/libs/rdbms/field/SQLiteField.php
+++ b/
includes/libs/rdbms/field/SQLiteField.php
@@
-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]
);
}
}