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
$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] );