Avoid variable naming conflicts in DatabasePostgres::selectSQLText
authorumherirrender <umherirrender_de.wp@web.de>
Tue, 28 Jan 2014 16:52:57 +0000 (17:52 +0100)
committerumherirrender <umherirrender_de.wp@web.de>
Tue, 28 Jan 2014 16:52:57 +0000 (17:52 +0100)
Spotted by gebhkla on bug 60531

Bug: 60531
Change-Id: Iaf100ea0db05b142549bd98da108e48eae8b9101

includes/db/DatabasePostgres.php

index 8f93d50..6475c8f 100644 (file)
@@ -833,9 +833,9 @@ __INDEXATTR__;
                        if ( $forUpdateKey !== false && $join_conds ) {
                                unset( $options[$forUpdateKey] );
 
-                               foreach ( $join_conds as $table => $join_cond ) {
+                               foreach ( $join_conds as $table_cond => $join_cond ) {
                                        if ( 0 === preg_match( '/^(?:LEFT|RIGHT|FULL)(?: OUTER)? JOIN$/i', $join_cond[0] ) ) {
-                                               $options['FOR UPDATE'][] = $table;
+                                               $options['FOR UPDATE'][] = $table_cond;
                                        }
                                }
                        }