diff --git a/packages/playground/data-liberation/src/wxr/WP_WXR_Reader.php b/packages/playground/data-liberation/src/wxr/WP_WXR_Reader.php index 25c21ff608..d22cf1e914 100644 --- a/packages/playground/data-liberation/src/wxr/WP_WXR_Reader.php +++ b/packages/playground/data-liberation/src/wxr/WP_WXR_Reader.php @@ -903,6 +903,8 @@ private function after_entity() { } public function current(): object { + // Lazily initialize the iterator when it is first accessed. + // The alternative is eager initialization in the constructor. if ( null === $this->entity_data && ! $this->is_finished() && ! $this->get_last_error() ) { $this->next(); }