Opened 5 years ago

Closed 5 years ago

#911 closed Task (fixed)

Review preg_match() usage

Reported by: vipsoft Owned by: vipsoft
Priority: major Milestone: Piwik 0.4.3
Component: Core Keywords:
Cc: Sensitive: no

Description (last modified by vipsoft)

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="([^"]+)"~',

Change History (2)

comment:1 Changed 5 years ago by vipsoft (robocoder)

  • Description modified (diff)

comment:2 Changed 5 years ago by vipsoft (robocoder)

  • Milestone changed from 2- DigitalVibes to 1 - Piwik 0.4.3
  • Resolution set to fixed
  • Status changed from new to closed

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 [1376], [1377], [1378].

Note: See TracTickets for help on using tickets.