CMS MADE SIMPLE FORGE

JM_Forum

 

[#9566] topic action flapping

avatar
Created By: Bruno TIGNAC (keleier)
Date Submitted: Wed Oct 02 06:38:45 -0400 2013

Assigned To:
Version: 1.0.0
CMSMS Version: 1.11.7
Severity: Minor
Resolution: None
State: Open
Summary:
topic action flapping
Detailed Description:
Hi,

I found a bug in IsPoster function.

The original code :

function IsPoster( $user_id )
        {
                return ($this->MyUserData['id'] === $user_id);
        }

But $user_id is a string, so the comparison is always failing.
The fix is :

        function IsPoster( $user_id )
        {
                return ($this->MyUserData['id'] === intval($user_id));
        }



History