• Hi there,

    Love the plugin. Though everything seems to be working fine, I see from my logs that I am getting the following error happening every time a PDF gets generated –

    ‘PHP Warning: preg_replace(): Compilation failed: regular expression is too large at offset 36048 in /xxxxxxxxxxxxxxxxxx/wp-content/plugins/dk-pdf/includes/mpdf60/classes/cssmgr.php on line 205’

    Sounds like the regex is too long. I’ve had a look and it appears to relate to this block of code in ‘cssmgr.php’ (there are three similar preg_replaces and this third one is where it seems to flag the error) –

    	preg_match_all( '/url\(([^\'\"].*?[^\'\"])\)/', $CSSstr, $m);
    		for($i = 0; $i < count($m[1]) ; $i++) {
    			$tmp = str_replace(array('(',')',';'),array('%28','%29',$tempmarker),$m[1][$i]);
    			$CSSstr = preg_replace('/'.preg_quote($m[0][$i],'/').'/', 'url(\''.$tmp.'\')', $CSSstr);
    		}

    Any ideas? As I say, seems to be working, just wondered if anyone else had experienced this.

    • This topic was modified 7 years, 10 months ago by dosser.
Viewing 1 replies (of 1 total)
  • Plugin Author dinamiko

    (@dinamiko)

    Hi dosser, sorry for the delay,

    I’m going to look at server logs in the demo site to see if this error appears, if so I’m going to try to solve it, thanks for informing about it ??

Viewing 1 replies (of 1 total)
  • The topic ‘Error message’ is closed to new replies.