Skip to content

Commit 78dab30

Browse files
committed
removed comments from serialized configuration, removed unused include
1 parent ec5e727 commit 78dab30

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/wcmf/lib/config/impl/InifileConfiguration.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -656,7 +656,9 @@ protected function serialize() {
656656
}
657657
$this->fileUtil->mkdirRec(dirname($cacheFile));
658658
if ($fh = @fopen($cacheFile, "w")) {
659-
if (@fwrite($fh, serialize(get_object_vars($this)))) {
659+
if (@fwrite($fh, serialize(array_filter(get_object_vars($this), function($value, $name) {
660+
return $name != 'comments'; // don't store comments
661+
}, ARRAY_FILTER_USE_BOTH)))) {
660662
@fclose($fh);
661663
}
662664
}

src/wcmf/lib/model/AbstractQuery.php

-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
use wcmf\lib\persistence\PagingInfo;
1818
use wcmf\lib\persistence\PersistenceAction;
1919
use wcmf\lib\persistence\PersistenceException;
20-
use wcmf\lib\persistence\PersistenceMapper;
2120

2221
/**
2322
* AbstractQuery is the base class for all query classes.

0 commit comments

Comments
 (0)