Fix caller name in User::addToDatabase
authorUmherirrender <umherirrender_de.wp@web.de>
Sun, 30 Sep 2018 13:22:29 +0000 (15:22 +0200)
committerUmherirrender <umherirrender_de.wp@web.de>
Sun, 30 Sep 2018 13:22:29 +0000 (15:22 +0200)
Seeing {closure} in the logs as caller is not helpful

Change-Id: I876877046ae4bd1756c13e04892c1381904566de

includes/user/User.php

index c9fe959..89fd99c 100644 (file)
@@ -4389,7 +4389,7 @@ class User implements IDBAccessObject, UserIdentity {
                                        'user',
                                        'user_id',
                                        [ 'user_name' => $this->mName ],
-                                       __METHOD__,
+                                       $fname,
                                        [ 'LOCK IN SHARE MODE' ]
                                );
                                $loaded = false;
@@ -4399,7 +4399,7 @@ class User implements IDBAccessObject, UserIdentity {
                                        }
                                }
                                if ( !$loaded ) {
-                                       throw new MWException( __METHOD__ . ": hit a key conflict attempting " .
+                                       throw new MWException( $fname . ": hit a key conflict attempting " .
                                                "to insert user '{$this->mName}' row, but it was not present in select!" );
                                }
                                return Status::newFatal( 'userexists' );