From 4a530d1d97b064b87d9e2a1cc64cab996246569c Mon Sep 17 00:00:00 2001 From: troosan Date: Wed, 3 Jan 2018 17:16:19 +0100 Subject: [PATCH] Do not show script source when running from CLI --- samples/Sample_Header.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/samples/Sample_Header.php b/samples/Sample_Header.php index 36478ad6..ac51f983 100644 --- a/samples/Sample_Header.php +++ b/samples/Sample_Header.php @@ -84,11 +84,6 @@ function write($phpWord, $filename, $writers) } $result .= getEndingNotes($writers); - $result .= '
';
-    if (file_exists($filename . '.php')) {
-        $result .= highlight_file($filename . '.php', true);
-    }
-    $result .= '
'; return $result; } @@ -127,6 +122,12 @@ function getEndingNotes($writers) } } $result .= '

'; + + $result .= '
';
+            if (file_exists($filename . '.php')) {
+                $result .= highlight_file($filename . '.php', true);
+            }
+            $result .= '
'; } }