Umherirrender has uploaded a new change for review.
https://gerrit.wikimedia.org/r/129936
Change subject: Use strict array_search in DatabasePostgres.php
......................................................................
Use strict array_search in DatabasePostgres.php
array_search( 'FOR UPDATE', array( 'OFFSET' => 0 ) ) gives 'OFFSET'
array_search( 'FOR UPDATE', array( 'OFFSET' => 0 ), true ) gives false
This avoids FOR UPDATE on QueryPage query like Special:BrokenRedirect.
Bug: 62104
Change-Id: Iaa6db6b3ce5eaf940e7a8afe459955f19ad0e01f
---
M includes/db/DatabasePostgres.php
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/36/129936/1
diff --git a/includes/db/DatabasePostgres.php b/includes/db/DatabasePostgres.php
index 3433199..131b758 100644
--- a/includes/db/DatabasePostgres.php
+++ b/includes/db/DatabasePostgres.php
@@ -831,7 +831,7 @@
$options = array(), $join_conds = array()
) {
if ( is_array( $options ) ) {
- $forUpdateKey = array_search( 'FOR UPDATE', $options );
+ $forUpdateKey = array_search( 'FOR UPDATE', $options,
true );
if ( $forUpdateKey !== false && $join_conds ) {
unset( $options[$forUpdateKey] );
--
To view, visit https://gerrit.wikimedia.org/r/129936
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Iaa6db6b3ce5eaf940e7a8afe459955f19ad0e01f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Umherirrender <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits