Jump to content

Object of class xxxxx could not be converted to string in xxxxx on line xxx


redbrad0

Recommended Posts

I am working on some changes to the application MediaWiki to make it better fit my needs which they say I need to create a "hook". I have created this hook with the below code but the problem is when I try and insert $article into a string so I can email it, I get a error that a object class could not be converted to string. I have looked all around and I am not even sure how I can extract the data from this $article variable. Does anyone have any suggestions on things to try?

 

$wgHooks['ArticleSaveComplete'][] = 'fnMyHook';

function fnMyHook(&$article, &$user, &$text, &$summary, &$minoredit, &$watchthis, &$sectionanchor, &$flags)
{
$email_text = "";
$email_text .= $article . "\n\n";
}

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.