Quantcast
Channel: Troubleshooting and Problems Discussions on osTicket Forums
Viewing all articles
Browse latest Browse all 568

A bug in class.ticket.php blocks full ticket functionality - please update the source code

$
0
0
I experienced a bug which was produced, most probably, by an old version of osTicket.

Having installed version 1.9.8, my clients submited several issues, but when I tried to open them, I cannot see anything after issue subject.

Upgrading the system to the version 1.10 RC3 didn't solve the problem.

I installed the copy of the system on my local computer and started the debug session and find out that there is a bug as follows:
\include\class.ticket.php file, line 568 time-to-time creates an error as follows: call to a member function getDesc() on string. So, after the code review I made a bug fix as follows:
The code before the fix:

    function getPriority() {
        if (($a = $this->_answers['priority']) && ($b = $a->getValue()))
            if(method_exists($b, 'getDesc'))
        return '';
    }

and the code after the fix:

    function getPriority() {
        if (($a = $this->_answers['priority']) && ($b = $a->getValue())) {
            if(method_exists($b, 'getDesc'))
                return $b->getDesc();
            else
                return (string)$b;
        }
        return '';
    }


Hope such a fix can make the system more stable.

Thx. Vlad.

Viewing all articles
Browse latest Browse all 568

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>