Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Review preg_match() usage #911

Closed
robocoder opened this issue Aug 8, 2009 · 1 comment
Closed

Review preg_match() usage #911

robocoder opened this issue Aug 8, 2009 · 1 comment
Assignees
Labels
Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical. Task Indicates an issue is neither a feature nor a bug and it's purely a "technical" change.
Milestone

Comments

@robocoder
Copy link
Contributor

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="([^"]+)"~',
      );
@robocoder
Copy link
Contributor Author

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 Jul 8, 2014
@robocoder robocoder self-assigned this Jul 8, 2014
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical. Task Indicates an issue is neither a feature nor a bug and it's purely a "technical" change.
Projects
None yet
Development

No branches or pull requests

1 participant