diff options
author | Andreas Gohr <andi@splitbrain.org> | 2008-01-18 22:41:38 +0100 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2008-01-18 22:41:38 +0100 |
commit | 5467607fe1ab31b4651d39268695b3eb15e9015f (patch) | |
tree | 5397af9a14cb489d85e077d1e1a1febffd0001d2 /inc/parser/lexer.php | |
parent | ece639c73c120111503182286a3768ae24ac37f9 (diff) | |
download | rpg-5467607fe1ab31b4651d39268695b3eb15e9015f.tar.gz rpg-5467607fe1ab31b4651d39268695b3eb15e9015f.tar.bz2 |
try to warn about pcre.backtrack_limit errors FS#1258
darcs-hash:20080118214138-7ad00-86962cd0413db95ea19383c4579b3240ad3c4301.gz
Diffstat (limited to 'inc/parser/lexer.php')
-rw-r--r-- | inc/parser/lexer.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/inc/parser/lexer.php b/inc/parser/lexer.php index 88deb7fe9..cf892e0bc 100644 --- a/inc/parser/lexer.php +++ b/inc/parser/lexer.php @@ -113,6 +113,11 @@ class Doku_LexerParallelRegex { } if (! preg_match($this->_getCompoundedRegex(), $subject, $matches)) { + if(function_exists('preg_last_error')){ + $err = preg_last_error(); + if($err == 2) msg('A PCRE backtrack error occured. Try to increase the pcre.backtrack_limit in php.ini',-1); + } + $split = array($subject, "", ""); return false; } |