(bug 32984) ar_sha1 might not be set
authorChad Horohoe <demon@users.mediawiki.org>
Mon, 12 Dec 2011 13:11:54 +0000 (13:11 +0000)
committerChad Horohoe <demon@users.mediawiki.org>
Mon, 12 Dec 2011 13:11:54 +0000 (13:11 +0000)
includes/Revision.php

index 3604b13..ae08163 100644 (file)
@@ -124,7 +124,7 @@ class Revision {
                        'text_id'    => isset( $row->ar_text_id ) ? $row->ar_text_id : null,
                        'deleted'    => $row->ar_deleted,
                        'len'        => $row->ar_len,
-                       'sha1'       => $row->ar_sha1
+                       'sha1'       => isset( $row->ar_sha1 ) ? $row->ar_sha1 : null,
                );
                if ( isset( $row->ar_text ) && !$row->ar_text_id ) {
                        // Pre-1.5 ar_text row