Page MenuHomePhabricator

Special:Version logs Object could not be convered to int
Closed, DeclinedPublic

Description

[Tue Aug 19 12:11:55 2008] [error] [client 10.95.30.102] PHP Notice: Object of class FooExtension could not be converted to int in ../includes/specials/SpecialVersion.php on line 313, referer: http://mywiki.com/wiki/Special:SpecialPages.

This error is being thrown on Special:Version for parser tag extensions under 1.13.0 but it did not happen under 1.12.0. The extensions, which all work, follow this pattern:

/* FooExtension.php */
<?php
$wgExtensionCredits['parserhook'][] = array(

>FooExtension
'author' =>'My Name',
'url' => 'http://foo',
'description' => 'docs here',
'version' => '1.0');

require_once('FooExtension_body.php');

Set up the hook

$wgExtensionFunctions[] = array(new FooExtension, 'setup');

Autoload system messages

$wgExtensionMessagesFiles['FooExtension'] = dirname(FILE) . '/FooExtension.i18n.php';

This is with PHP 5.1.6 on CentOS 5 Linux.


Version: 1.13.x
Severity: normal
OS: Linux
Platform: Other

Details

Reference
bz15270

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:20 PM
bzimport set Reference to bz15270.
bzimport added a subscriber: Unknown Object (MLST).

$wgExtensionFunctions is an array of function name. You should not feed it
with an object !

http://www.mediawiki.org/wiki/Manual:$wgExtensionFunctions