makeKnownLinkObj call error

classic Classic list List threaded Threaded
3 messages Options
Fxp
Reply | Threaded
Open this post in threaded view
|

makeKnownLinkObj call error

Fxp
Hello to all,

Trying to make a link from a db query (for my calendar extension, but
always end up with this error message at the top of the resulting page:

Warning: Problem with method call - please report this bug in
C:\apache2\htdocs\phase3\extensions\Calendar.php on line 204

The problem is that my extension is not a class (should I still use the

I tried this which works but gives the warning:

        global $wgUser;
        $skin = $wgUser->getSkin();
        foreach($entries[$today] as $key ){
        $nt = Title::makeTitle( $entriesProperties[$today][0], $key );
        $link = $this->skin->makeKnownLinkObj( $nt, '', $extra ); //
line of the error... it works but gives a warning
            $output .= '<li>'.$link."</li>\n";
        }

And also:

        global $wgUser;
        $skin =& $wgUser->getSkin();
        foreach($entries[$today] as $key ){
        $link = $skin->makeKnownLinkObj( Title::makeTitle(
$entriesProperties[$today][0], $key ), '' );// works but with a warning
            $output .= '<li>'.$link."</li>\n";
        }

Can someone tell me how to get rid of this warning ?

Thanks for your help

Fran├žois

_______________________________________________
MediaWiki-l mailing list
[hidden email]
http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: makeKnownLinkObj call error

Brion Vibber
FxParlant wrote:

> Warning: Problem with method call - please report this bug in
> C:\apache2\htdocs\phase3\extensions\Calendar.php on line 204
>
> The problem is that my extension is not a class (should I still use the
>
> I tried this which works but gives the warning:
>
>         global $wgUser;
>         $skin = $wgUser->getSkin();
>         foreach($entries[$today] as $key ){
>         $nt = Title::makeTitle( $entriesProperties[$today][0], $key );
>         $link = $this->skin->makeKnownLinkObj( $nt, '', $extra ); //
> line of the error... it works but gives a warning
If this isn't in an object instance method, $this won't work too well. :)

Try: $skin->makeKnownLinkObj

If that doesn't help it may be a bug in PHP. Make sure you've upgraded to the
latest release.

-- brion vibber (brion @ pobox.com)


_______________________________________________
MediaWiki-l mailing list
[hidden email]
http://mail.wikipedia.org/mailman/listinfo/mediawiki-l

signature.asc (257 bytes) Download Attachment
Fxp
Reply | Threaded
Open this post in threaded view
|

Re: makeKnownLinkObj call error

Fxp
Thank your Brion,

After struggling a part of the night on this,
I found out that I wasn't exploring the right line Grrrrr!

The warning about "method call" comes from the line:

$nt = Title::makeTitle( $row->page_namespace, $row->page_title );

This time I'm sure :-/

Nevertheless, the resulting action is OK

http://fxparlant.net/Category:Test

Any idea ?

Fran├žois



Brion Vibber wrote:

> FxParlant wrote:
>> Warning: Problem with method call - please report this bug in
>> C:\apache2\htdocs\phase3\extensions\Calendar.php on line 204
>>
>> The problem is that my extension is not a class (should I still use the
>>
>> I tried this which works but gives the warning:
>>
>>         global $wgUser;
>>         $skin = $wgUser->getSkin();
>>         foreach($entries[$today] as $key ){
>>         $nt = Title::makeTitle( $entriesProperties[$today][0], $key );
>>         $link = $this->skin->makeKnownLinkObj( $nt, '', $extra ); //
>> line of the error... it works but gives a warning
>
> If this isn't in an object instance method, $this won't work too well. :)
>
> Try: $skin->makeKnownLinkObj
>
> If that doesn't help it may be a bug in PHP. Make sure you've upgraded to the
> latest release.
>
> -- brion vibber (brion @ pobox.com)
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> MediaWiki-l mailing list
> [hidden email]
> http://mail.wikipedia.org/mailman/listinfo/mediawiki-l

_______________________________________________
MediaWiki-l mailing list
[hidden email]
http://mail.wikipedia.org/mailman/listinfo/mediawiki-l