From 32836d032750b0ad5fbd7fb1e54f9588375384d8 Mon Sep 17 00:00:00 2001 From: Cloud User <centos@marcus.test.uib.no> Date: Fri, 30 Oct 2020 20:25:39 +0100 Subject: [PATCH] fix preg_replace syntax, first char is separator --- classes/modules/uriModule.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/classes/modules/uriModule.php b/classes/modules/uriModule.php index ffdc7f3a..460e6fe5 100644 --- a/classes/modules/uriModule.php +++ b/classes/modules/uriModule.php @@ -21,8 +21,8 @@ class UriModule extends abstractModule{ $pair = Queries::getMetadata($localUri, $acceptContentType, $metaDb); #Stripping html to look up and write correct url in database if not exists #Fix to handle pages that have not been loaded after cleaning out database - $localUri_stripped = preg_replace("^(.+)\.html$", "\\1", $localUri); - $uri_stripped = preg_replace("^(.+)\.html$", "\\1", $uri); + $localUri_stripped = preg_replace("/^(.+)\.html$/i", "\\1", $localUri); + $uri_stripped = preg_replace("/^(.+)\.html$/i", "\\1", $uri); if($pair == NULL){ // Original URI is not in metadata if(Queries::uriExist($uri_stripped, $endpoints['local'])){ $page = Queries::createPage($uri_stripped, $localUri_stripped, $acceptContentType, $metaDb); -- GitLab