FreePBX / issue-tracker

The unified FreePBX issue tracker.
https://www.freepbx.org
GNU General Public License v3.0
12 stars 1 forks source link

[bug]: VoIP Innovations module metered trunk gives whoops #541

Closed ramarajan222 closed 2 weeks ago

ramarajan222 commented 2 weeks ago

FreePBX Version

FreePBX 17

Issue Description

Ref :- https://community.freepbx.org/t/voip-innovations-module-metered-trunk-gives-whoops/102193 VoIP Innovations module metered trunk gives whoops when trying to edit the trunk.

image

Operating Environment

FreePBX V17

Relevant log output

Whoops \ Exception \ ErrorException (E_DEPRECATED)
htmlentities(): Passing null to parameter #1 ($string) of type string is deprecated

 if ($tech!="enum") {

            $channelid = htmlentities($trunk_details['channelid'],ENT_COMPAT | ENT_HTML401, "UTF-8");

            if ($tech!="custom" && $tech!="dundi") {  // custom trunks will not have user/peer details in database table
                // load from db
                if (empty($peerdetails)) {
                    $peerdetails = core_trunks_getTrunkPeerDetails($trunknum);
                }
                if (empty($usercontext)) {
                    $usercontext = htmlentities($trunk_details['usercontext'],ENT_COMPAT | ENT_HTML401, "UTF-8");
                }

                if (empty($userconfig)) {
                    $userconfig = core_trunks_getTrunkUserConfig($trunknum);
                }

                if (empty($register)) {
                    $register = core_trunks_getTrunkRegister($trunknum);
                }
            }
        }
ramarajan222 commented 2 weeks ago

Fixed on core version 17.0.18.7