Skip to content


Review preg_match() usage #911

robocoder opened this Issue · 1 comment

1 participant


PHP 5.1.x appears to handle backslash escaped characters differently from 5.2/5.3.

Example: core/SmartyPlugins/output.cachebuster where php 5.1.x reports preg_replace() [function.preg-replace]: Unknown modifier '.'

Propose using:

      $pattern = array(
        '~<script type="text/javascript" src="([^"]+)">~',
        '~<script src="([^"]+)" type="text/javascript">~',
        '~<link rel="stylesheet" type="text/css" href="([^"]+)"~',

I'm marking this as fixed cause I don't see anything more that can done here, other than to recommend using a newer version of PHP.

See changesets [1377, [1378].

@robocoder robocoder added this to the Piwik 0.4.3 milestone
@robocoder robocoder self-assigned this
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.