Permalink
Browse files

Remove error setting when reading/deleting non-existent key.

Fixes #3813
  • Loading branch information...
1 parent 3d682ba commit db26e24cb754ca3489f242cbf2b7354ddf4ade9d @ADmad ADmad committed May 3, 2013
@@ -250,7 +250,6 @@ public static function delete($name) {
self::_overwrite($_SESSION, Hash::remove($_SESSION, $name));
return !self::check($name);
}
- self::_setError(2, __d('cake_dev', "%s doesn't exist", $name));
return false;
}
@@ -370,7 +369,6 @@ public static function read($name = null) {
if (isset($result)) {
return $result;
}
- self::_setError(2, "$name doesn't exist");
return null;
}
@@ -348,21 +348,6 @@ public function testStarted() {
}
/**
- * testError method
- *
- * @return void
- */
- public function testError() {
- TestCakeSession::read('Does.not.exist');
- $result = TestCakeSession::error();
- $this->assertEquals("Does.not.exist doesn't exist", $result);
-
- TestCakeSession::delete('Failing.delete');
- $result = TestCakeSession::error();
- $this->assertEquals("Failing.delete doesn't exist", $result);
- }
-
-/**
* testDel method
*
* @return void

0 comments on commit db26e24

Please sign in to comment.