Merge "Follow-up Ia16e19985: Fix table sort arrow direction"
[lhc/web/wiklou.git] / includes / Block.php
index 696a520..b8e900d 100644 (file)
@@ -844,7 +844,7 @@ class Block {
                                        'ipb_expiry' => $dbw->timestamp( $this->mExpiry ),
                                ],
                                [ /* WHERE */
-                                       'ipb_address' => (string)$this->getTarget()
+                                       'ipb_id' => $this->getId(),
                                ],
                                __METHOD__
                        );
@@ -1307,8 +1307,7 @@ class Block {
                # but actually an old subpage (bug #29797)
                if ( strpos( $target, '/' ) !== false ) {
                        # An old subpage, drill down to the user behind it
-                       $parts = explode( '/', $target );
-                       $target = $parts[0];
+                       $target = explode( '/', $target )[0];
                }
 
                $userObj = User::newFromName( $target );