Skip to content
This repository
Browse code

MINOR Remove use of deprecated ereg_replace() and use preg_replace() …

…instead.
  • Loading branch information...
commit 1ab76865eae00d41f63f9dcc71035f683c8f48b1 1 parent 8166c26
Sean Harvey authored March 27, 2012
4  code/staticpublisher/FilesystemPublisher.php
@@ -102,8 +102,8 @@ function urlsToPaths($urls) {
102 102
 			// perform similar transformations to SiteTree::generateURLSegment()
103 103
 			$urlSegment = str_replace('&','-and-',$urlSegment);
104 104
 			$urlSegment = str_replace('&','-and-',$urlSegment);
105  
-			$urlSegment = ereg_replace('[^A-Za-z0-9\/-]+','-',$urlSegment);
106  
-			$urlSegment = ereg_replace('-+','-',$urlSegment);
  105
+			$urlSegment = preg_replace('/[^A-Za-z0-9\/-]+/', '-', $urlSegment);
  106
+			$urlSegment = preg_replace('/-+/', '-', $urlSegment);
107 107
 			$urlSegment = trim($urlSegment, '/');
108 108
 
109 109
 			$filename = $urlSegment ? "$urlSegment.$this->fileExtension" : "index.$this->fileExtension";

0 notes on commit 1ab7686

Please sign in to comment.
Something went wrong with that request. Please try again.