-
-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Let's try to trick this broken memcached extension
- Loading branch information
Showing
2 changed files
with
4 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,14 +9,13 @@ | |
*/ | ||
namespace NinjaMutex\Mock; | ||
|
||
use Memcached; | ||
|
||
/** | ||
* Mock memcached to mimic mutex functionality | ||
* | ||
* @author Kamil Dziedzic <[email protected]> | ||
*/ | ||
class MockMemcached extends Memcached implements PermanentServiceInterface | ||
class MockMemcached implements PermanentServiceInterface | ||
{ | ||
/** | ||
* @var string[] | ||
|
@@ -40,7 +39,7 @@ public function __construct() | |
* @param null $udf_flags | ||
* @return bool | ||
*/ | ||
public function add($key, $value, $expiration = null, $udf_flags = null) | ||
public function add($key, $value, $expiration = null, &$udf_flags = null) | ||
{ | ||
if (!$this->available) { | ||
return false; | ||
|
@@ -62,7 +61,7 @@ public function add($key, $value, $expiration = null, $udf_flags = null) | |
* @param null $udf_flags | ||
* @return bool|mixed|string | ||
*/ | ||
public function get($key, $cache_cb = null, $cas_token = null, $udf_flags = null) | ||
public function get($key, $cache_cb = null, &$cas_token = null, &$udf_flags = null) | ||
{ | ||
if (!$this->available) { | ||
return false; | ||
|