From ce58b325c86b9cd0e77d75fd6fe07c5ece9e4d24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Kv=C3=A1=C4=8Dek?= Date: Mon, 13 Mar 2017 12:08:26 +0100 Subject: [PATCH] FIX: fix latent bug in save pipeline - trim backslashes from handler name --- .../SaveContent/TurnCommentsOnOrOff.php | 2 +- .../SavePipeline/SaveContactInformation.php | 3 ++- .../PipelineProcess/RenderPage.php | 20 ------------------- .../Providers/StaticPagesServiceProvider.php | 1 - 4 files changed, 3 insertions(+), 23 deletions(-) delete mode 100644 modules/StaticPages/PipelineProcess/RenderPage.php diff --git a/modules/Blog/Article/Pipeline/SaveContent/TurnCommentsOnOrOff.php b/modules/Blog/Article/Pipeline/SaveContent/TurnCommentsOnOrOff.php index 0571fdc7..f52e4bc1 100644 --- a/modules/Blog/Article/Pipeline/SaveContent/TurnCommentsOnOrOff.php +++ b/modules/Blog/Article/Pipeline/SaveContent/TurnCommentsOnOrOff.php @@ -17,7 +17,7 @@ class TurnCommentsOnOrOff implements Process */ function handle(Content & $content, array & $input) { - if ($content->moduleHandler !== Article::class) { + if (trim($content->moduleHandler, '\\') !== Article::class) { return; } diff --git a/modules/ContactForm/Pipeline/SavePipeline/SaveContactInformation.php b/modules/ContactForm/Pipeline/SavePipeline/SaveContactInformation.php index 0c809522..a4f74412 100644 --- a/modules/ContactForm/Pipeline/SavePipeline/SaveContactInformation.php +++ b/modules/ContactForm/Pipeline/SavePipeline/SaveContactInformation.php @@ -17,8 +17,9 @@ class SaveContactInformation implements Process */ function handle(Content & $page, array & $input) { - if ($page->moduleHandler != ContactForm::class) + if (trim($page->moduleHandler, '\\') != ContactForm::class) { return; + } $settings = [ 'phone' => $input['phone'], diff --git a/modules/StaticPages/PipelineProcess/RenderPage.php b/modules/StaticPages/PipelineProcess/RenderPage.php deleted file mode 100644 index ee8f63aa..00000000 --- a/modules/StaticPages/PipelineProcess/RenderPage.php +++ /dev/null @@ -1,20 +0,0 @@ -