Page MenuHomePhabricator

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


Warning: Title::newFromTitle: $text must be a string

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


  • host:
  • 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.

Related Objects

Event Timeline

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 subscriber: Aklapper. · View Herald Transcript
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

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

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

Catrope claimed this task.