|
List Info
Thread: 0007597: Notification e-mail contain no messages.
|
|
| 0007597: Notification e-mail contain no
messages. |

|
2007-05-09 18:00:56 |
|
I’ve looked briefly at this issue this evening
The issue seems to be – if you add a large bugnote (I
added a ‘test’ one of ~30KB̵7;s), you get an empty box within
mantis itself – the email reference is irrelevant.
If you click on edit you can see the full 30KB’;s.
As I believe it was Ave said this is a PHP / PCRE limit in
some of the 5.x releases kicking in during preg_match_all.
I’m trying to understand what’;s trying to be
achieved by the preg_match_all line in string_process_bug_link – it would
appear to me at first glance we could achieve the similar with preg_replace and
not hit the issue with large bugnotes/emails/whatever by doing something
similar to:
In string_process_bug_link, do :
$p_string =
preg_replace_callback( '/' . preg_quote($t_tag, '/') . '(d+)/', 'testcall',
$p_string);
Return $p_string
function testcall ($foo) {
if
(bug_exists( (int)$foo[1] ) ) {
return
string_get_bug_view_link( $foo[1], null, $p_detail_info, $p_fqdn ) ;
}
else {
return
$t_bug_id; }
}
Whilst the initial regex seems more complex to handle some
cases, so the above might need some tweaking, from what I can tell the above:
a)
Works for large links e.g. 30KB’;s of text
b)
Unless I misread my brief comparision, is slightly
faster then the preg_match_all
Thoughts?
Paul
|
[1]
|
|
|
about | contact Other archives ( Real Estate discussion Medical topics )
|