Legoktm has submitted this change and it was merged.

Change subject: Can't use an object as an array key, so use 
Title::getFullText() instead.
......................................................................


Can't use an object as an array key, so use Title::getFullText() instead.

Change-Id: Idedfd319d0892a77830ce94cb50b8bfc56db5f48
---
M SpecialMassMessage.php
1 file changed, 3 insertions(+), 3 deletions(-)

Approvals:
  Legoktm: Verified; Looks good to me, approved



diff --git a/SpecialMassMessage.php b/SpecialMassMessage.php
index f1b9a3b..19fbc2e 100644
--- a/SpecialMassMessage.php
+++ b/SpecialMassMessage.php
@@ -110,7 +110,7 @@
                        $title = Title::makeTitle( $ns, $row->pl_title );
                        $title = MassMessage::followRedirect( $title );
                        if ( $title !== null ) { // Skip interwiki redirects
-                               $pages[$title] = true; // Use an assoc array to 
quickly and easily filter out duplicates
+                               $pages[$title->getFullText()] = $title; // Use 
an assoc array to quickly and easily filter out duplicates
                        }
                }
                return $pages;
@@ -175,8 +175,8 @@
                $this->logToWiki( $spamlist, $data['subject'] );
 
                // Insert it into the job queue.
-               $pages = array_keys( $this->getLocalTargets( $spamlist ) );
-               foreach ( $pages as $page ) {
+               $pages = $this->getLocalTargets( $spamlist );
+               foreach ( $pages as $title => $page ) {
                        $job = new MassMessageJob( $page, $data );
                        JobQueueGroup::singleton()->push( $job );
                }

-- 
To view, visit https://gerrit.wikimedia.org/r/75273
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Idedfd319d0892a77830ce94cb50b8bfc56db5f48
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/MassMessage
Gerrit-Branch: master
Gerrit-Owner: Legoktm <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to