You are not logged in.
When users try to add a new ticket where no title, and in description char 70 is the new line is SQL-error and the new ticket isn't added.
The problem in regular expressions to convert the description in the title.
File inc/ticket.class.php:
// No name set name
if (empty($input["name"])) {
$input["name"] = preg_replace('/\r\n/',' ',$input['content']);
$input["name"] = preg_replace('/\n/',' ',$input['name']);
$input["name"] = utf8_substr($input['name'],0,70);
}
For example, add a ticket with the following description:
123456789012345678901234567890123456789012345678901234567890123456789<new line>
Before if we have in string $input['content'] (length 73):
123456789012345678901234567890123456789012345678901234567890123456789\r\n
After if in $input["name"]:
123456789012345678901234567890123456789012345678901234567890123456789\
Of course, this line causes an error when adding to the database. This error is observed in the current version (0.78.5) and previous.
Regular expressions are used now do not work for strings, when the \r\n is 4 symbols, they are written for strings in which \r\n is 1 char.
Example of fix, we changed the following lines:
// No name set name
if (empty($input["name"])) {
$input["name"] = preg_replace('/\\\r\\\n/',' ',$input['content']);
$input["name"] = preg_replace('/\\\n/',' ',$input['name']);
$input["name"] = utf8_substr($input['name'],0,70);
}
Please fix it.
Offline
Oh, sorry. Please replace topic in forum "English speaking users".
Offline