Skip to content

Commit 79af371

Browse files
committed
Added a warning regarding binary proto and touch
1 parent 67ec375 commit 79af371

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

php_memcached.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1392,10 +1392,9 @@ static void php_memc_store_impl(INTERNAL_FUNCTION_PARAMETERS, int op, zend_bool
13921392
}
13931393

13941394
if (op == MEMC_OP_TOUCH) {
1395-
#ifdef mikko_0
1396-
if (!memcached_behavior_get(m_obj->memc, MEMCACHED_BEHAVIOR_BINARY_PROTOCOL)) {
1397-
php_error_docref(NULL TSRMLS_CC, E_WARNING, "touch is only supported with binary protocol");
1398-
RETURN_FALSE;
1395+
#if defined(LIBMEMCACHED_VERSION_HEX) && LIBMEMCACHED_VERSION_HEX < 0x01000015
1396+
if (memcached_behavior_get(m_obj->memc, MEMCACHED_BEHAVIOR_BINARY_PROTOCOL)) {
1397+
php_error_docref(NULL TSRMLS_CC, E_WARNING, "using touch command with binary protocol is not recommended with libmemcached versions below 1.0.15");
13991398
}
14001399
#endif
14011400
} else {

0 commit comments

Comments
 (0)