diff options
author | Masterklavi <masterklavi@gmail.com> | 2016-03-12 07:37:27 +0100 |
---|---|---|
committer | Masterklavi <masterklavi@gmail.com> | 2016-03-12 07:38:06 +0100 |
commit | db91d5b1b3ed2cfd8e1ad0ba59906ad527ef8786 (patch) | |
tree | bb916fd63713840f8a804231a57645641d82543d | |
parent | 1c6a3f4356856899f012c6dc1ae81a21c35016e0 (diff) |
The "get_class($A) == B" replaced by "$A instanceof B"
-rw-r--r-- | system/libraries/Cache/drivers/Cache_memcached.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/system/libraries/Cache/drivers/Cache_memcached.php b/system/libraries/Cache/drivers/Cache_memcached.php index c44958b97..ae90b9858 100644 --- a/system/libraries/Cache/drivers/Cache_memcached.php +++ b/system/libraries/Cache/drivers/Cache_memcached.php @@ -115,7 +115,7 @@ class CI_Cache_memcached extends CI_Driver { isset($cache_server['port']) OR $cache_server['port'] = $defaults['port']; isset($cache_server['weight']) OR $cache_server['weight'] = $defaults['weight']; - if (get_class($this->_memcached) === 'Memcache') + if ($this->_memcached instanceof Memcache) { // Third parameter is persistance and defaults to TRUE. $this->_memcached->addServer( @@ -169,11 +169,11 @@ class CI_Cache_memcached extends CI_Driver { $data = array($data, time(), $ttl); } - if (get_class($this->_memcached) === 'Memcached') + if ($this->_memcached instanceof Memcached) { return $this->_memcached->set($id, $data, $ttl); } - elseif (get_class($this->_memcached) === 'Memcache') + elseif ($this->_memcached instanceof Memcache) { return $this->_memcached->set($id, $data, 0, $ttl); } |