Anomie has uploaded a new change for review. ( 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(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/OAuth refs/changes/89/378089/1 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: newchange Gerrit-Change-Id: I785230df11a7c81644fe08dc384a42631f4e5775 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/OAuth Gerrit-Branch: master Gerrit-Owner: Anomie <bjor...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits