DatabasePostgres: Ignore "IGNORE" option to update()
[lhc/web/wiklou.git] / includes / libs / rdbms / database / DatabasePostgres.php
index 9610839..94509a3 100644 (file)
@@ -640,6 +640,18 @@ __INDEXATTR__;
                return true;
        }
 
+       protected function makeUpdateOptionsArray( $options ) {
+               if ( !is_array( $options ) ) {
+                       $options = [ $options ];
+               }
+
+               // PostgreSQL doesn't support anything like "ignore" for
+               // UPDATE.
+               $options = array_diff( $options, [ 'IGNORE' ] );
+
+               return parent::makeUpdateOptionsArray( $options );
+       }
+
        /**
         * INSERT SELECT wrapper
         * $varMap must be an associative array of the form [ 'dest1' => 'source1', ... ]