Skip to content

Commit 20d68eb

Browse files
committed
Clear metadata
1 parent 4417397 commit 20d68eb

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/class-xml-file-base.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
abstract class xml_file_base implements xml_file_interface {
4-
public $metadata;
4+
private $metadata;
55

66
abstract function type();
77

@@ -19,6 +19,7 @@ private function ensure_metadata() {
1919
return $this->metadata;
2020
}
2121

22+
public function clear_metadata() { unset($metadata); }
2223
public function init_metadata() { /* Overridable */ }
2324
public function get_property_list() { return array_keys($this->ensure_metadata()); }
2425
public function has_property($field) { return in_array($field, $this->get_property_list()); }

src/class-xml-file.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ public function clear()
7575
unset($this->sourceDate);
7676
unset($this->Doc);
7777
unset($this->XQuery);
78+
$this->clear_metadata();
7879
$this->loaded = false;
7980
$this->filename = "";
8081
$this->mode = "";

0 commit comments

Comments
 (0)