Last modified: 2012-04-12 13:55:38 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T29665, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 27665 - Special:AllMessages throws "Object of class Title to string conversion"
Special:AllMessages throws "Object of class Title to string conversion"
Status: RESOLVED WORKSFORME
Product: MediaWiki
Classification: Unclassified
Special pages (Other open bugs)
1.16.x
All Linux
: Normal minor (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-02-23 19:28 UTC by Dan Barrett
Modified: 2012-04-12 13:55 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Dan Barrett 2011-02-23 19:28:28 UTC
When I hit Special:AllMessages, this note appears in the http logs:

Notice:  Object of class Title to string conversion in /var/www/html/w/includes/Html.php on line 399
Comment 1 Mark A. Hershberger 2011-02-23 23:04:20 UTC
Do you have any extensions installed?
Comment 2 Dan Barrett 2011-02-24 14:50:28 UTC
When I remove all extensions, the error remains.
Comment 3 Bryan Tong Minh 2011-02-24 15:00:59 UTC
Which version of PHP are you using?
Comment 4 Dan Barrett 2011-02-24 15:13:31 UTC
PHP 5.1.6, standard with CentOS 5.
Comment 5 Dan Barrett 2011-02-24 15:17:23 UTC
In the line that throws the error:

  $ret .= " $key=$quote" . strtr( $value, $map ) . $quote;

here is the value of $value:

hiddenTitle Object
(
    [mTextform] => AllMessages
    [mUrlform] => AllMessages
    [mDbkeyform] => AllMessages
    [mUserCaseDBKey] => 
    [mNamespace] => -1
    [mInterwiki] => 
    [mFragment] => 
    [mArticleID] => 0
    [mLatestID] => 
    [mRestrictions] => Array
        (
        )

    [mOldRestrictions] => 
    [mCascadeRestriction] => 
    [mRestrictionsExpiry] => Array
        (
        )

    [mHasCascadingRestrictions] => 
    [mCascadeSources] => 
    [mRestrictionsLoaded] => 
    [mPrefixedText] => 
    [mDefaultNamespace] => 0
    [mWatched] => 
    [mLength] => -1
    [mRedirect] => 
    [mNotificationTimestamp] => Array
        (
        )

    [mBacklinkCache] => 
)
Comment 6 Bryan Tong Minh 2011-02-24 15:18:15 UTC
PHP 5.1 does not fully support automatic string conversion I believe. I just looked up our installation requirements, and 5.1 is still listed as supported, so this should be fixed.

The fix would be to pass $title->getPrefixedText() instead of $title to one of the Html functions.
Comment 7 Chad H. 2012-01-17 15:07:58 UTC
Marking as WFM, since this works just fine in 5.2+ and the minimum supported version is 5.2.3

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links