diff --git a/src/Configurator/JavaScript.php b/src/Configurator/JavaScript.php index 139ffdd26..ad8b38378 100644 --- a/src/Configurator/JavaScript.php +++ b/src/Configurator/JavaScript.php @@ -378,7 +378,7 @@ protected function getSource() $src = ''; // If getLogger() is not exported we use a dummy Logger that can be optimized away - $logger = (in_array('getLogger', $this->exports)) ? 'Logger.js' : 'NullLogger.js'; + $logger = (in_array('getLogger', $this->exports, true)) ? 'Logger.js' : 'NullLogger.js'; // Prepare the list of files $files = glob($rootDir . '/Parser/AttributeFilters/*.js'); diff --git a/src/Plugins/HTMLElements/Configurator.php b/src/Plugins/HTMLElements/Configurator.php index 7ee2f587c..a08b7be03 100644 --- a/src/Plugins/HTMLElements/Configurator.php +++ b/src/Plugins/HTMLElements/Configurator.php @@ -156,7 +156,7 @@ protected function allowElementWithSafety($elName, $allowUnsafe) $elName = $this->normalizeElementName($elName); $tagName = $this->prefix . ':' . $elName; - if (!$allowUnsafe && in_array($elName, $this->unsafeElements)) + if (!$allowUnsafe && in_array($elName, $this->unsafeElements, true)) { throw new RuntimeException("'" . $elName . "' elements are unsafe and are disabled by default. Please use " . __CLASS__ . '::allowUnsafeElement() to bypass this security measure'); } @@ -221,7 +221,7 @@ protected function allowAttributeWithSafety($elName, $attrName, $allowUnsafe) if (!$allowUnsafe) { if (substr($attrName, 0, 2) === 'on' - || in_array($attrName, $this->unsafeAttributes)) + || in_array($attrName, $this->unsafeAttributes, true)) { throw new RuntimeException("'" . $attrName . "' attributes are unsafe and are disabled by default. Please use " . __CLASS__ . '::allowUnsafeAttribute() to bypass this security measure'); }