summaryrefslogtreecommitdiff
path: root/ext/mcrypt
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2015-09-24 22:39:59 +0300
committerDmitry Stogov <dmitry@zend.com>2015-09-24 22:39:59 +0300
commitad4fa8f75810facff8bea509249a735232235443 (patch)
tree13b4b2f3df2a2df85a8d3b9702024ac8213f37a7 /ext/mcrypt
parentabf6a0b376b42e0ce60da039b11c6fdf994431fb (diff)
downloadphp-git-ad4fa8f75810facff8bea509249a735232235443.tar.gz
Fixed incorrect usage of HASH_OF() macro. Replaced HASH_OF() with more appropriate Z_ARRVAL_P() or Z_OBJPROP_P().
Diffstat (limited to 'ext/mcrypt')
-rw-r--r--ext/mcrypt/mcrypt_filter.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/ext/mcrypt/mcrypt_filter.c b/ext/mcrypt/mcrypt_filter.c
index 3a3f390036..b626821c7b 100644
--- a/ext/mcrypt/mcrypt_filter.c
+++ b/ext/mcrypt/mcrypt_filter.c
@@ -174,7 +174,7 @@ static php_stream_filter *php_mcrypt_filter_create(const char *filtername, zval
return NULL;
}
- if ((tmpzval = zend_hash_str_find(HASH_OF(filterparams), ZEND_STRL("mode")))) {
+ if ((tmpzval = zend_hash_str_find(Z_ARRVAL_P(filterparams), ZEND_STRL("mode")))) {
if (Z_TYPE_P(tmpzval) == IS_STRING) {
mode = Z_STRVAL_P(tmpzval);
} else {
@@ -182,7 +182,7 @@ static php_stream_filter *php_mcrypt_filter_create(const char *filtername, zval
}
}
- if ((tmpzval=zend_hash_str_find(HASH_OF(filterparams), ZEND_STRL("algorithms_dir")))) {
+ if ((tmpzval=zend_hash_str_find(Z_ARRVAL_P(filterparams), ZEND_STRL("algorithms_dir")))) {
if (Z_TYPE_P(tmpzval) == IS_STRING) {
algo_dir = Z_STRVAL_P(tmpzval);
} else {
@@ -190,7 +190,7 @@ static php_stream_filter *php_mcrypt_filter_create(const char *filtername, zval
}
}
- if ((tmpzval=zend_hash_str_find(HASH_OF(filterparams), ZEND_STRL("modes_dir")))) {
+ if ((tmpzval=zend_hash_str_find(Z_ARRVAL_P(filterparams), ZEND_STRL("modes_dir")))) {
if (Z_TYPE_P(tmpzval) == IS_STRING) {
mode_dir = Z_STRVAL_P(tmpzval);
} else {
@@ -198,7 +198,7 @@ static php_stream_filter *php_mcrypt_filter_create(const char *filtername, zval
}
}
- if ((tmpzval = zend_hash_str_find(HASH_OF(filterparams), ZEND_STRL("key"))) &&
+ if ((tmpzval = zend_hash_str_find(Z_ARRVAL_P(filterparams), ZEND_STRL("key"))) &&
Z_TYPE_P(tmpzval) == IS_STRING) {
key = Z_STRVAL_P(tmpzval);
key_len = (int)Z_STRLEN_P(tmpzval);
@@ -218,7 +218,7 @@ static php_stream_filter *php_mcrypt_filter_create(const char *filtername, zval
key_len = keyl;
}
- if (!(tmpzval = zend_hash_str_find(HASH_OF(filterparams), ZEND_STRL("iv"))) ||
+ if (!(tmpzval = zend_hash_str_find(Z_ARRVAL_P(filterparams), ZEND_STRL("iv"))) ||
Z_TYPE_P(tmpzval) != IS_STRING) {
php_error_docref(NULL, E_WARNING, "Filter parameter[iv] not provided or not of type: string");
mcrypt_module_close(mcrypt_module);