summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/jetpack/modules/sitemaps/sitemap-buffer.php')
-rw-r--r--plugins/jetpack/modules/sitemaps/sitemap-buffer.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/plugins/jetpack/modules/sitemaps/sitemap-buffer.php b/plugins/jetpack/modules/sitemaps/sitemap-buffer.php
index 3596486d..4a24bb12 100644
--- a/plugins/jetpack/modules/sitemaps/sitemap-buffer.php
+++ b/plugins/jetpack/modules/sitemaps/sitemap-buffer.php
@@ -1,4 +1,4 @@
-<?php
+<?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName
/**
* Sitemaps (per the protocol) are essentially lists of XML fragments;
* lists which are subject to size constraints. The Jetpack_Sitemap_Buffer
@@ -139,7 +139,7 @@ abstract class Jetpack_Sitemap_Buffer {
* @return bool True if the append succeeded, False if not.
*/
public function append( $array ) {
- if ( is_null( $array ) ) {
+ if ( $array === null ) {
return true;
}
@@ -270,7 +270,8 @@ abstract class Jetpack_Sitemap_Buffer {
if ( null === $parent ) {
$return_string = true;
- $parent = $root = new DOMDocument();
+ $root = new DOMDocument();
+ $parent = $root;
}
if ( is_array( $array ) ) {