]> git.mxchange.org Git - core.git/commitdiff
Continued:
authorRoland Häder <roland@mxchange.org>
Sun, 26 Jan 2025 17:43:50 +0000 (18:43 +0100)
committerRoland Häder <roland@mxchange.org>
Sun, 26 Jan 2025 17:43:50 +0000 (18:43 +0100)
- string and NULL wasn't a good idea

framework/main/classes/decorator/xml/template/class_XmlRewriterTemplateDecorator.php
framework/main/classes/template/xml/class_BaseXmlTemplateEngine.php
framework/main/interfaces/template/xml/class_CompileableXmlTemplate.php

index 80ef846e70f48dfca34adac812b1ae569fdf34a2..50ff116ebb5a587c7aa93fb4e14ae6f4a6cfa453 100644 (file)
@@ -334,7 +334,7 @@ class XmlRewriterTemplateDecorator extends BaseDecorator implements CompileableX
         * @return      void
         * @throws      XmlParserException      If an XML error was found
         */
-       public function renderXmlContent (string $content = NULL) {
+       public function renderXmlContent (string $content = '') {
                // Call the inner class' method
                $this->getTemplateInstance()->renderXmlContent($content);
        }
index bc53481c7cfa69b6b3beaaac257f568da73765aa..7d344ac7fc35f59104ae242f62d42369f4cd00e8 100644 (file)
@@ -450,10 +450,10 @@ abstract class BaseXmlTemplateEngine extends BaseTemplateEngine implements Compi
         * @return      void
         * @throws      InvalidArgumentException        If a parameter has an invalid value
         */
-       public function renderXmlContent (string $content = NULL) {
+       public function renderXmlContent (string $content = '') {
                // Is the content set?
                /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->traceMessage(sprintf('BASE-XML-TEMPLATE-ENGINE: content[%s]()=%d - CALLED!', gettype($content), strlen($content)));
-               if (is_null($content)) {
+               if (empty($content)) {
                        // Get current content
                        $content = $this->getRawTemplateData();
                } elseif (empty($content)) {
index 9e9dbb180cf832e581eb823a8feaa382d654a454..fc05362b3b0fc749547e0c019b6dd84f78314f73 100644 (file)
@@ -36,7 +36,7 @@ interface CompileableXmlTemplate extends CompileableTemplate {
         * @return      void
         * @throws      XmlParserException      If an XML error was found
         */
-       function renderXmlContent (string $content = NULL);
+       function renderXmlContent (string $content = '');
 
        /**
         * Enables or disables XML compacting