Paul C Posted September 5, 2011 Share Posted September 5, 2011 Just noticed that the latest version 1.4.4.1 release requires PHP 5.2.x or higher. Just a heads up for anyone who moves from a test server running 5.2 to a production server running an earlier version..... This dependency can be removed by replacing the Tools::packJSinHTML() function with one from an older 1.4 version. Alternatively you could use this replacement: public static function packJSinHTML($html_content) { if (strlen($html_content) > 0) { $htmlContentCopy = $html_content; $html_content = preg_replace_callback( '/\\s*(<script\\b[^>]*?>)([\\s\\S]*?)(<\\/script>)\\s*/i' ,array('Tools', 'packJSinHTMLpregCallback') ,$html_content); // If the string is too big preg_replace return an error // In this case, we don't compress the content //if ( preg_last_error() == PREG_BACKTRACK_LIMIT_ERROR ) { if (!$html_content) { error_log('ERROR: PREG_BACKTRACK_LIMIT_ERROR in function packJSinHTML'); return $htmlContentCopy; } return $html_content; } return false; } Paul 1 Link to comment Share on other sites More sharing options...
bellini13 Posted September 7, 2011 Share Posted September 7, 2011 thanks for sharing! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now