jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/378089 )

Change subject: MWOAuthDAO: Fix for distinction between field and column
......................................................................


MWOAuthDAO: Fix for distinction between field and column

Change-Id: I785230df11a7c81644fe08dc384a42631f4e5775
---
M backend/MWOAuthDAO.php
1 file changed, 3 insertions(+), 2 deletions(-)

Approvals:
  Chad: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/backend/MWOAuthDAO.php b/backend/MWOAuthDAO.php
index e4bad47..ba8cba6 100644
--- a/backend/MWOAuthDAO.php
+++ b/backend/MWOAuthDAO.php
@@ -176,11 +176,12 @@
                } else {
                        $this->logger->debug( get_class( $this ) . ': 
performing DB update; new object.' );
                        $afield = static::getAutoIncrField();
+                       $acolumn = $afield !== null ? static::getColumn( 
$afield ) : null;
                        $row = $this->getRowArray( $dbw );
-                       if ( $afield !== null && $row[$afield] === null ) {
+                       if ( $acolumn !== null && $row[$acolumn] === null ) {
                                // auto-increment field should be omitted, not 
set null, for
                                // auto-incrementing behavior
-                               unset( $row[$afield] );
+                               unset( $row[$acolumn] );
                        }
                        $dbw->insert(
                                static::getTable(),

-- 
To view, visit https://gerrit.wikimedia.org/r/378089
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I785230df11a7c81644fe08dc384a42631f4e5775
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/OAuth
Gerrit-Branch: master
Gerrit-Owner: Anomie <bjor...@wikimedia.org>
Gerrit-Reviewer: Chad <ch...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to