redbrad0 Posted August 1, 2007 Share Posted August 1, 2007 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"; } Link to comment https://forums.phpfreaks.com/topic/62872-object-of-class-xxxxx-could-not-be-converted-to-string-in-xxxxx-on-line-xxx/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.