From 8da54040d41c0fb93d22e67f7b6ecd82e9612bd6 Mon Sep 17 00:00:00 2001 From: horst-n Date: Sat, 27 Apr 2019 00:36:42 +0200 Subject: [PATCH] added a verbose debug method that can be called manually on every imagevariation and with individual options array. --- wire/core/Pageimage.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/wire/core/Pageimage.php b/wire/core/Pageimage.php index 4da0ef6a..b89b3e3c 100644 --- a/wire/core/Pageimage.php +++ b/wire/core/Pageimage.php @@ -1942,12 +1942,12 @@ class Pageimage extends Pagefile { $indents = array_map('strlen', $lines); if($indents) $m = max($indents) + 1; $content = preg_replace_callback( - '#^(.*)=>\\n\s+(\S)#Um', - function($match) use ($m) { - return $match[1] . str_repeat(' ', ($m - strlen($match[1]) > 1 ? $m - strlen($match[1]) : 1)) . $match[2]; - }, - $content - ); + '#^(.*)=>\\n\s+(\S)#Um', + function($match) use ($m) { + return $match[1] . str_repeat(' ', ($m - strlen($match[1]) > 1 ? $m - strlen($match[1]) : 1)) . $match[2]; + }, + $content + ); $content = preg_replace('#^((\s*).*){$#m', "\\1\n\\2{", $content); $content = str_replace(array('
', '
'), '', $content); if(isset($_SERVER['HTTP_HOST'])) {