Page MenuHomePhabricator

"Title::newFromTitle: $text must be a string" from Echo
Closed, ResolvedPublic

Description

Warning: Title::newFromTitle: $text must be a string
from
EchoDiscussionParser::generateEventsForRevision/EchoDiscussionParser::generateMentionEvents/User::newFromName/User::getCanonicalName/Title::newFromText

Looking in logstash for channel:T76305 to find these hits.

Sample:

  • host: de.wikipedia.org
  • url: /w/index.php?title=Portal_Diskussion:[..]&action=submit
  • http_method: POST

It seems all hits have http_method POST. Other factors vary (dewiki, enwiki, frwiki, ..)

Note that Title::newFromText already throws for objects and tolerates null. So this must be a primitive non-null, non-string value being passed somehow.

Event Timeline

Krinkle created this task.Oct 20 2015, 4:27 PM
Krinkle raised the priority of this task from to Medium.
Krinkle updated the task description. (Show Details)
Krinkle added subscribers: Krinkle, Reedy, Catrope.
Restricted Application added a project: Collaboration-Team-Triage. · View Herald TranscriptOct 20 2015, 4:27 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Krinkle updated the task description. (Show Details)Nov 17 2015, 1:39 AM
Krinkle set Security to None.

The newFromName call is in code that looks like this:

$links = $output->getLinks();
foreach ( $links[NS_USER] as $dbk => $page_id ) {
	$user = User::newFromName( $dbk );

Where $output is a ParserOutput, and the documentation for getLinks() claims it returns array( ns => array( dbkey => pageid ) )

Change 267024 had a related patch set uploaded (by TTO):
Linker: Avoid passing false to Title::newFromText

https://gerrit.wikimedia.org/r/267024

Change 267023 had a related patch set uploaded (by TTO):
Title::newFromText: Cast integers to strings

https://gerrit.wikimedia.org/r/267023

Change 267023 merged by jenkins-bot:
Title::newFromText: Cast integers to strings

https://gerrit.wikimedia.org/r/267023

Catrope closed this task as Resolved.Feb 13 2016, 12:26 AM
Catrope claimed this task.