Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Cleaned the use of unset on properties #52

Merged
merged 1 commit into from

2 participants

@stof

Unsetting a property does not unset the value but removes the property
from the class definition for the instance.

@stof stof Cleaned the use of unset on properties
Unsetting a property does not unset the value but removes the property
from the class definition for the instance.
f6c6e3e
@tedivm tedivm merged commit 7f47019 into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Nov 28, 2012
  1. @stof

    Cleaned the use of unset on properties

    stof authored
    Unsetting a property does not unset the value but removes the property
    from the class definition for the instance.
This page is out of date. Refresh to see the latest.
View
4 src/Stash/Driver/Sub/Sqlite.php
@@ -48,7 +48,7 @@ public function __construct($path, $directoryPermission, $filePermission, $busyT
public function __destruct()
{
- unset($this->driver);
+ $this->driver = null;
}
public function get($key)
@@ -99,7 +99,7 @@ public function clear($key = null)
if (!isset($key)) {
unset($driver);
- unset($this->driver);
+ $this->driver = null;
$this->driver = false;
\Stash\Utilities::deleteRecursive($this->path);
} else {
View
2  tests/Stash/Test/AbstractCacheTest.php
@@ -310,7 +310,7 @@ public function testClear()
public function testExtendCache()
{
- unset($this->driver);
+ $this->driver = null;
foreach ($this->data as $type => $value) {
$key = array('base', $type);
Something went wrong with that request. Please try again.