summaryrefslogtreecommitdiffstats
path: root/swoole-pr992.patch
blob: a5788d3999174c665bffe79334b2d8ffdeb1f520 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
From dc26ffb786701033cb2fe7eae01ccb09a5f829b1 Mon Sep 17 00:00:00 2001
From: Remi Collet <fedora@famillecollet.com>
Date: Fri, 30 Dec 2016 19:32:47 +0100
Subject: [PATCH] another fix for ZTS

---
 swoole_redis_coro.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/swoole_redis_coro.c b/swoole_redis_coro.c
index a0a650e..28b907c 100755
--- a/swoole_redis_coro.c
+++ b/swoole_redis_coro.c
@@ -3732,6 +3732,9 @@ void swoole_redis_coro_onClose(const redisAsyncContext *c, int status)
 
 static int swoole_redis_onError(swReactor *reactor, swEvent *event)
 {
+#if PHP_MAJOR_VERSION < 7
+    TSRMLS_FETCH_FROM_CTX(sw_thread_ctx ? sw_thread_ctx : NULL);
+#endif
     swRedisClient *redis = event->socket->object;
     redisAsyncContext *c = redis->context;
 	zend_update_property_long(swoole_redis_coro_class_entry_ptr, redis->object, ZEND_STRL("errCode"), c->err TSRMLS_CC);