Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Facebook Sign In with Google Sign In with OpenID Sign In with Twitter

Categories

Who's Online 15

CurtisOdenPewPewKericgillettemcdjmcdjperegrinesarowlwp422 +8 guests

Addon unapproved: ereg is deprecated

This discussion is related to the Magic addon.
I've unapproved this addon.

I was doing some testing on this addon after some changes to our codebase, and I noticed that the author is using ereg, which is a deprecated php function. You will need to update the plugin to use preg_match instead of ereg on line 25.

I also noticed that there is a bug in DiscussionController_BeforeCommentBody_Handler. The first comment in a discussion actually comes from the discussion data rather than the comment list. You will need to account for this when grabbing the first comment's body. Here's a fix:
public function DiscussionController_BeforeCommentBody_Handler(&$Sender) {
$Object = array_key_exists('Comment', $Sender->EventArguments) ? 'Comment' : 'Discussion';
$Sender->EventArguments[$Object]->Body = $this->MakeView($Sender->EventArguments[$Object]->Body);
}
Sign In or Register to comment.