Permalink
Browse files

Fixed another PHP5.3 issue.

  • Loading branch information...
Cody Lundquist
Cody Lundquist committed Apr 16, 2013
1 parent 57a83f2 commit 7f9680952da6468aaf5716af99f2a7d98a598388
Showing with 3 additions and 2 deletions.
  1. +3 −2 src/Munee/Asset/Type/Css.php
@@ -152,9 +152,10 @@ protected function fixRelativeImagePaths($content, $originalFile)
{
$regEx = '%((?:background(?:-image)?|list-style-image):.*?url[\\s]*\()[\\s\'"]*(\.\.[^\\)\'"]*)[\\s\'"]*(\\)[\\s]*)%';
$changedContent = preg_replace_callback($regEx, function ($match) use ($originalFile) {
$webroot = $this->request->webroot;
$changedContent = preg_replace_callback($regEx, function ($match) use ($originalFile, $webroot) {
$basePathPrefix = str_replace($this->request->webroot, '', dirname($originalFile));
$basePathPrefix = str_replace($webroot, '', dirname($originalFile));
if (! empty($basePathPrefix)) {
$basePathPrefix .= '/';

0 comments on commit 7f96809

Please sign in to comment.