Skip to content

Commit

Permalink
Don't unset properties just default to null
Browse files Browse the repository at this point in the history
  • Loading branch information
Universal-Omega authored Feb 10, 2025
1 parent 3f27d39 commit 1617c15
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions includes/services/PortableInfoboxDataService.php
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,7 @@ public function save( NodeInfobox $raw ) {
*/
public function delete() {
$this->clear();

// @phan-suppress-next-line PhanTypeObjectUnsetDeclaredProperty
unset( $this->cache );
$this->cache = null;

return $this;
}
Expand All @@ -158,16 +156,14 @@ public function delete() {
*/
public function purge() {
$this->memcached->delete( $this->cachekey );

// @phan-suppress-next-line PhanTypeObjectUnsetDeclaredProperty
unset( $this->cache );
$this->cache = null;

return $this;
}

// soft cache handlers
protected function get() {
if ( !isset( $this->cache ) ) {
if ( !$this->cache ) {
$this->cache = $this->load();
}

Expand Down

0 comments on commit 1617c15

Please sign in to comment.