Merge "Always set suppressredirect of type move for new api logparam style"
[lhc/web/wiklou.git] / includes / Revision.php
index a13499a..3ba6157 100644 (file)
@@ -1428,6 +1428,14 @@ class Revision implements IDBAccessObject {
 
                $this->mId = $rev_id !== null ? $rev_id : $dbw->insertId();
 
+               // Assertion to try to catch T92046
+               if ( (int)$this->mId === 0 ) {
+                       throw new UnexpectedValueException(
+                               'After insert, Revision mId is ' . var_export( $this->mId, 1 ) . ': ' .
+                                       var_export( $row, 1 )
+                       );
+               }
+
                Hooks::run( 'RevisionInsertComplete', array( &$this, $data, $flags ) );
 
                return $this->mId;