Topic on Extension talk:Widgets

PHP Fatal error: Cannot access self:: when no class scope is active in extensions/Widgets/WidgetRenderer.php on line 146

5
Nevermind85 (talkcontribs)

Hello, I get the above error when trying to submit or preview a page that embeds a widget. We are using PHP 5.3.3 and my guess is that this is not supported, as this thread suggests:

function( $matches ) {
    return self::widgets[$matches[1]];
},

Is this the case? if so, is there any way to modify the outputCompiledWidget function so that this works?

Thanks, Eric.

Yaron Koren (talkcontribs)

Sorry about that - it was a recent change to the code. If you re-get the code from Git, I think it's fixed now.

202.36.134.22 (talkcontribs)

Hi, thank you for the update. Now I get PHP Fatal error: Cannot access private property WidgetRenderer::$widgets in /var/www/html/KiwiWiki/extensions/Widgets/WidgetRenderer.php on line 147. If I make it public (in line 12) it obviously works, but I reckon that's not what you want :)

Yaron Koren (talkcontribs)

Sorry again! This too has been fixed, and in fact it was just with a change to "public".

Nevermind85 (talkcontribs)

Oh, well now I feel silly. Thank you so much, working fine now!

Reply to "PHP Fatal error: Cannot access self:: when no class scope is active in extensions/Widgets/WidgetRenderer.php on line 146"