Page 1 of 1

Ticket not entered into database if apostrophe present.

Posted: Thu May 26, 2005 8:45 pm
by forgette
Script URL: [private]
Version of script: 0.91
Version of PHP: 4.3.11
Hosting company: [myself]
Have you searched THIS FORUM for your problem: yes
(if not please do before posting)
If so, what terms did you try: conjunctions, contraction, apostrophe, '

It appears that if an individual submitting a ticket includes an ' in the message field, it will result in the ticket not being entered into the database.

Sample [edited for privacy]

Couldn't execute SQL: INSERT INTO `hesk_tickets` ( `id`,`trackid`,`name`,`email`,`category`,`priority`,`subject`,`message
`,`dt`,`ip`,`status` ) VALUES ( '','NDEWZE1Q4P','Sean','foo@bar.com','12','3','Test ticket and Intranet','Bill, if you get a chance tell me what you think of the links on the Intranet. If you have any other wording or location in mind I'm all ears.',NOW(),'IPADDRESSHERE','1' )
Please contact webmaster at bill@foo.bar and give him this error message


Notice the: I'm

Take out I'm and it works fine.

Posted: Thu May 26, 2005 10:53 pm
by Klemen
Hi,

Thanks for letting me know, will fix this. As a temporary solution you can try editing your php.ini file and set magic_quotes_gpc to On:

magic_quotes_gpc=On

Regards

Posted: Sat May 28, 2005 12:50 pm
by Klemen
Does this file solve your problem? Just replace the original common.inc (in the "inc" folder) with this one:

http://www.phpjunkyard.com/extras/hesk_common.zip

Does it fix it?

Regards

apostrophe isse fixed

Posted: Sat May 28, 2005 1:47 pm
by forgette
the new common.inc fixes the apostrophe issue.

Thanks!

Posted: Sat May 28, 2005 2:54 pm
by Klemen
Ok, I've included that fix in the new 0.92 version along with some other fixes.

Regards