HiI have been testing osTicket with a test dummy support email address and everything is good!I am now testing with our real support address, retrieveing tickets via POP in exactly the same way, and the ticket gets raised and added to the ticket list, however if I try to view the ticket, i get the problem as per the attached screenshot.Can anyone help me with this please?I cannot find any differences for the life of me!Cheers

phperror.JPG

I have found this only happens when a ticket is emailed by a new user who is not in the users database with a phone number. I guess the field in the table is NULL and so the funtion is not working?If it is a known user with a phone number, it works OK...

OK, I have tracked this down to the fact that I changed the phone number field data type to string as the formatting is incorrect for the UK. The 'unformatted' type phone number still formats the damn number by stripping off the leading zero and stripping out white spaces. The spaces we can do without but we must have the 0 for screen diallers.Can anyone point me in the direction of the code that formats the phone number please?I cannae find it!CheersDave

I believe that what you're looking for is in: /include/class.validator.php

I have change back to US formatting for the time being. The bit that formats the number to US style is in class.format.php. Should be fairly straightforward to write a switch option to format for the UK, howver something somewhere strips the leading zero off the phone number, but I cannt find where. It's deffo stripping a leading zero rather than concatenating the string to 10 chars. It's like there is a function somewhere converting it to an INT before doing further manipulation.

Sorry I dont have an off the top of my head answer for you and do not have the time to go digging atm.  I'll try to remember to take a peek later though (although i warn you that I will probably forget).

Yes, I ran out of time looking for it too! In the end I re-wrote the format: function to format for the UK. Well, I have done 3 of the most common formats. Due to our ridiculous numbering system it will need some more work. I included a line to prepend a zero to the number, it was quicker than trying to find where or how it got stripped off. Not sure if it is the way to go, but works so far!

Cheers for the reply

Write a Reply...