diff options
author | Pavlo Yatsukhnenko <yatsukhnenko@gmail.com> | 2018-07-29 22:57:03 +0300 |
---|---|---|
committer | Pavlo Yatsukhnenko <yatsukhnenko@gmail.com> | 2018-07-29 22:57:03 +0300 |
commit | 7171aceaaa8d29081264b4006a5caf8124164933 (patch) | |
tree | 44afe01d4b1045973972e840dba5ce46c61955b6 /redis_session.c | |
parent | 0858f0837beaf9e8b247f195fe8b8494326e8054 (diff) |
Issue #1367
Use `zval_get_long` instead of `Z_STRVAL_P` + `atof` for parsing
timeout and read_timeout params.
Diffstat (limited to 'redis_session.c')
-rw-r--r-- | redis_session.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/redis_session.c b/redis_session.c index 099f353a..2fb49a09 100644 --- a/redis_session.c +++ b/redis_session.c @@ -469,10 +469,10 @@ PS_OPEN_FUNC(redis) weight = zval_get_long(param); } if ((param = zend_hash_str_find(Z_ARRVAL(params), "timeout", sizeof("timeout") - 1)) != NULL) { - timeout = atof(Z_STRVAL_P(param)); + timeout = zval_get_double(param); } if ((param = zend_hash_str_find(Z_ARRVAL(params), "read_timeout", sizeof("read_timeout") - 1)) != NULL) { - read_timeout = atof(Z_STRVAL_P(param)); + read_timeout = zval_get_double(param); } if ((param = zend_hash_str_find(Z_ARRVAL(params), "persistent", sizeof("persistent") - 1)) != NULL) { persistent = (atol(Z_STRVAL_P(param)) == 1 ? 1 : 0); |