Screen Resolution Bug
Posted: Tue Oct 20, 2015 5:30 pm
I upgraded from v2.42 to v2.5 this morning...
I am unable to submit tickets via the ticket submission form after the update.
Note: I haven't tested this with JavaScript disabled. This, presumably, wouldn't resolve the issue since we'd be trying to insert a not-integer value into an integer MySQL column. (Of course, there could also be other, bigger issues with JavaScript disabled.)
I am unable to POP3 scrape tickets.
hesk_pop3.php connects to the remote mailbox and checks for messages.
I changed
To this
Obviously POP-scraping will never be able to use the screen resolution detection features, but I built-in a conditional check to see if there was a value set for these index keys in case other functions relied on posting_functions.inc.php.
I am unable to submit tickets via the ticket submission form after the update.
Digging into the problem, it looks index.php is trying to use jQuery to change the values of two hidden form inputs that haven't been created. I reused the following snippet that I found a few lines later to create the missing HTML elements:MySQL Error
Incorrect integer value: '' for column 'screen_resolution_height' at row 1
Code: Select all
<input type="hidden" id="screen-resolution-height" name="screen_resolution_height">
<input type="hidden" id="screen-resolution-width" name="screen_resolution_width">
I am unable to POP3 scrape tickets.
hesk_pop3.php connects to the remote mailbox and checks for messages.
This could probably be addressed in several ways. I'm addressing it via inc/posting_functions.inc.php.MySQL Error
Incorrect integer value: '' for column 'screen_resolution_height' at row 1
I changed
Code: Select all
'" . hesk_dbEscape($ticket['user_agent']) . "',
'" . hesk_dbEscape($ticket['screen_resolution_height']) . "',
'" . hesk_dbEscape($ticket['screen_resolution_width']) . "'
)
");
Code: Select all
'" . hesk_dbEscape($ticket['user_agent']) . "',
" . ($ticket['screen_resolution_height']==""?"null":"'" . hesk_dbEscape($ticket['screen_resolution_height']) . "'") . ",
" . ($ticket['screen_resolution_width']==""?"null":"'" . hesk_dbEscape($ticket['screen_resolution_width']) . "'") . ")
");