mirror of
https://github.com/php-win-ext/pecl-memcache.git
synced 2026-03-24 00:52:07 +01:00
trivial/minimal fix for PHP 8.2 (#104)
This commit is contained in:
@@ -733,9 +733,15 @@ PHP_MINIT_FUNCTION(memcache)
|
||||
|
||||
INIT_CLASS_ENTRY(ce, "MemcachePool", php_memcache_pool_class_functions);
|
||||
memcache_pool_ce = zend_register_internal_class(&ce);
|
||||
#if PHP_VERSION_ID >= 80200
|
||||
memcache_pool_ce->ce_flags |= ZEND_ACC_ALLOW_DYNAMIC_PROPERTIES;
|
||||
#endif
|
||||
|
||||
INIT_CLASS_ENTRY(ce, "Memcache", php_memcache_class_functions);
|
||||
memcache_ce = zend_register_internal_class_ex(&ce, memcache_pool_ce);
|
||||
#if PHP_VERSION_ID >= 80200
|
||||
memcache_ce->ce_flags |= ZEND_ACC_ALLOW_DYNAMIC_PROPERTIES;
|
||||
#endif
|
||||
|
||||
le_memcache_pool = zend_register_list_destructors_ex(_mmc_pool_list_dtor, NULL, "memcache connection", module_number);
|
||||
le_memcache_server = zend_register_list_destructors_ex(NULL, _mmc_server_list_dtor, "persistent memcache connection", module_number);
|
||||
|
||||
@@ -44,7 +44,7 @@ if (is_array($result))
|
||||
sort($result);
|
||||
var_dump($result);
|
||||
|
||||
$result = ini_set('memcache.allow_failover', "abc");
|
||||
$result = @ini_set('memcache.allow_failover', "abc");
|
||||
var_dump($result);
|
||||
|
||||
?>
|
||||
|
||||
@@ -8,6 +8,8 @@ Nested get's in __wakeup()
|
||||
include 'connect.inc';
|
||||
|
||||
class testclass {
|
||||
public $result = null;
|
||||
|
||||
function __wakeup() {
|
||||
global $memcache;
|
||||
$this->result = $memcache->get('_test_key3');
|
||||
@@ -48,4 +50,4 @@ array(2) {
|
||||
[0]=>
|
||||
int(123)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user