Page MenuHomePhabricator

Title::newFromText: $text must be a string [includes/Title.php at line 266]
Closed, ResolvedPublic

Description

[11-Apr-2015 17:42:13 UTC] PHP Notice:  Title::newFromText: $text must be a string. This will throw an
          InvalidArgumentException in future. [Called from Title::newFromText in /srv/mediawiki/tags/2015-04-10_10:04:17/includes/Title.php at
          line 266] in /srv/mediawiki/tags/2015-04-10_10:04:17/includes/debug/MWDebug.php on line 300

[Mon May 18 18:30:00 2015] [hphp] [30942:7f9b6c3ff700:486:000001] [] \nNotice: Title::newFromText: $text must
          be a string. This will throw an InvalidArgumentException in future. [Called from LogPager::limitTitle in
          /srv/mediawiki/tags/2015-05-18_15:13:26/includes/logging/LogPager.php at line 200] in
          /srv/mediawiki/tags/2015-05-18_15:13:26/includes/debug/MWDebug.php on line 300

Details

Related Gerrit Patches:

Event Timeline

Nemo_bis created this task.May 18 2015, 4:34 PM
Nemo_bis raised the priority of this task from to Needs Triage.
Nemo_bis updated the task description. (Show Details)
Nemo_bis added a subscriber: Nemo_bis.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMay 18 2015, 4:34 PM
Aklapper triaged this task as Medium priority.May 20 2015, 1:25 PM
Duke33 added a subscriber: Duke33.May 26 2015, 7:49 PM

I installed 1.25 yesterday on my wiki and I'm getting a very similar error on the Special:UserRights page when debugging is turned on:

Notice: Title::newFromText: $text must be a string. This will throw an InvalidArgumentException in future. [Called from Title::newFromText in /home/tmbw/public_html/wiki/includes/Title.php at line 266] in /home/tmbw/public_html/wiki/includes/debug/MWDebug.php on line 300

Same thing as this?

Hard to tell. My notice seems to come from a log visit, yours could be anything; the error should be made more useful I guess.

Glaisher added a subscriber: Glaisher.

I installed 1.25 yesterday on my wiki and I'm getting a very similar error on the Special:UserRights page when debugging is turned on:
Notice: Title::newFromText: $text must be a string. This will throw an InvalidArgumentException in future. [Called from Title::newFromText in /home/tmbw/public_html/wiki/includes/Title.php at line 266] in /home/tmbw/public_html/wiki/includes/debug/MWDebug.php on line 300
Same thing as this?

Probably fixed in T103945: "Title::newFromTitle: $text must be a string" from UserrightsPage::execute

Krinkle changed the task status from Open to Stalled.Oct 20 2015, 4:19 PM
Krinkle added a subscriber: Krinkle.

Please provide a stack so that one can determine which caller caused it. A few months ago we added stack logging for T76305, so later instances of this bug should contain a stack. Without it, this bug is not actionable.

What I have now is

15.50 -rakkaus:#mediawiki-i18n- [Sun Sep 20 15:50:08 2015] [hphp] [922:7f3a25bff700:30625:000001] [] \nNotice: Title::newFromText: $text must
          be a string. This will throw an InvalidArgumentException in future. [Called from SpecialPageTranslationMovePage::execute in
          /srv/mediawiki/tags/2015-09-13_07:14:17/extensions/Translate/tag/SpecialPageTranslationMovePage.php at line 81] in
          /srv/mediawiki/tags/2015-09-13_07:14:17/includes/de...
00.50 -rakkaus:#mediawiki-i18n- [Tue Sep 22 00:50:15 2015] [hphp] [922:7f39f43ff700:40677:000001] [] \nNotice: Title::newFromText: $text must
          be a string. This will throw an InvalidArgumentException in future. [Called from SpecialPageTranslationMovePage::execute in
          /srv/mediawiki/tags/2015-09-13_07:14:17/extensions/Translate/tag/SpecialPageTranslationMovePage.php at line 81] in
          /srv/mediawiki/tags/2015-09-13_07:14:17/includes/de...
18.12 -rakkaus:#mediawiki-i18n- [Wed Sep 30 18:12:17 2015] [hphp] [1159:7fec16bff700:6839:000001] [] \nNotice: Title::newFromText: $text must
          be a string. This will throw an InvalidArgumentException in future. [Called from SpecialPageTranslationMovePage::execute in
          /srv/mediawiki/tags/2015-09-28_18:51:55/extensions/Translate/tag/SpecialPageTranslationMovePage.php at line 81] in
          /srv/mediawiki/tags/2015-09-28_18:51:55/includes/de...
13.36 -rakkaus:#mediawiki-i18n- [Sat Oct  3 13:36:19 2015] [hphp] [1159:7febb37ff700:33760:000001] [] \nNotice: Title::newFromText: $text must
          be a string. This will throw an InvalidArgumentException in future. [Called from SpecialPageTranslationMovePage::execute in
          /srv/mediawiki/tags/2015-09-28_18:51:55/extensions/Translate/tag/SpecialPageTranslationMovePage.php at line 81] in
          /srv/mediawiki/tags/2015-09-28_18:51:55/includes/d...
Glaisher changed the task status from Stalled to Open.Oct 21 2015, 5:06 PM

Change 247873 had a related patch set uploaded (by Glaisher):
SpecialPageTranslationMovePage: Don't pass strings to Title::newFromText

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

Change 247873 merged by jenkins-bot:
SpecialPageTranslationMovePage: Don't pass strings to Title::newFromText

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

Nemo_bis closed this task as Resolved.Oct 22 2015, 7:53 AM
Nemo_bis assigned this task to Glaisher.
Nemo_bis set Security to None.