Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

…instead.
  • Loading branch information...
commit 1ab76865eae00d41f63f9dcc71035f683c8f48b1 1 parent 8166c26
@halkyon halkyon authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 code/staticpublisher/FilesystemPublisher.php
View
4 code/staticpublisher/FilesystemPublisher.php
@@ -102,8 +102,8 @@ function urlsToPaths($urls) {
// perform similar transformations to SiteTree::generateURLSegment()
$urlSegment = str_replace('&','-and-',$urlSegment);
$urlSegment = str_replace('&','-and-',$urlSegment);
- $urlSegment = ereg_replace('[^A-Za-z0-9\/-]+','-',$urlSegment);
- $urlSegment = ereg_replace('-+','-',$urlSegment);
+ $urlSegment = preg_replace('/[^A-Za-z0-9\/-]+/', '-', $urlSegment);
+ $urlSegment = preg_replace('/-+/', '-', $urlSegment);
$urlSegment = trim($urlSegment, '/');
$filename = $urlSegment ? "$urlSegment.$this->fileExtension" : "index.$this->fileExtension";
Please sign in to comment.
Something went wrong with that request. Please try again.