Fix error in various deprecated selectFields() methods
[lhc/web/wiklou.git] / includes / Block.php
index 2bae13b..a7b8035 100644 (file)
@@ -224,7 +224,7 @@ class Block {
                        'ipb_address',
                        'ipb_by',
                        'ipb_by_text',
-                       'ipb_by_actor' => $wgActorTableSchemaMigrationStage > MIGRATION_OLD ? 'ipb_by_actor' : null,
+                       'ipb_by_actor' => $wgActorTableSchemaMigrationStage > MIGRATION_OLD ? 'ipb_by_actor' : 'NULL',
                        'ipb_timestamp',
                        'ipb_auto',
                        'ipb_anon_only',
@@ -458,7 +458,7 @@ class Block {
        protected function initFromRow( $row ) {
                $this->setTarget( $row->ipb_address );
                $this->setBlocker( User::newFromAnyId(
-                       $row->ipb_by, $row->ipb_by_text, isset( $row->ipb_by_actor ) ? $row->ipb_by_actor : null
+                       $row->ipb_by, $row->ipb_by_text, $row->ipb_by_actor ?? null
                ) );
 
                $this->mTimestamp = wfTimestamp( TS_MW, $row->ipb_timestamp );
@@ -521,7 +521,7 @@ class Block {
         *
         * @param IDatabase $dbw If you have one available
         * @return bool|array False on failure, assoc array on success:
-        *      ('id' => block ID, 'autoIds' => array of autoblock IDs)
+        *      ('id' => block ID, 'autoIds' => array of autoblock IDs)
         */
        public function insert( $dbw = null ) {
                global $wgBlockDisablesLogin;