summaryrefslogtreecommitdiff
path: root/ext/zip/php_zip.c
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/zip/php_zip.c
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/zip/php_zip.c')
-rw-r--r--ext/zip/php_zip.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/zip/php_zip.c b/ext/zip/php_zip.c
index f68534c48d..0e0d5db725 100644
--- a/ext/zip/php_zip.c
+++ b/ext/zip/php_zip.c
@@ -314,12 +314,12 @@ static int php_zip_add_file(struct zip *za, const char *filename, size_t filenam
static int php_zip_parse_options(zval *options, zend_long *remove_all_path, char **remove_path, size_t *remove_path_len, char **add_path, size_t *add_path_len) /* {{{ */
{
zval *option;
- if ((option = zend_hash_str_find(HASH_OF(options), "remove_all_path", sizeof("remove_all_path") - 1)) != NULL) {
+ if ((option = zend_hash_str_find(Z_ARRVAL_P(options), "remove_all_path", sizeof("remove_all_path") - 1)) != NULL) {
*remove_all_path = zval_get_long(option);
}
/* If I add more options, it would make sense to create a nice static struct and loop over it. */
- if ((option = zend_hash_str_find(HASH_OF(options), "remove_path", sizeof("remove_path") - 1)) != NULL) {
+ if ((option = zend_hash_str_find(Z_ARRVAL_P(options), "remove_path", sizeof("remove_path") - 1)) != NULL) {
if (Z_TYPE_P(option) != IS_STRING) {
php_error_docref(NULL, E_WARNING, "remove_path option expected to be a string");
return -1;
@@ -339,7 +339,7 @@ static int php_zip_parse_options(zval *options, zend_long *remove_all_path, char
*remove_path = Z_STRVAL_P(option);
}
- if ((option = zend_hash_str_find(HASH_OF(options), "add_path", sizeof("add_path") - 1)) != NULL) {
+ if ((option = zend_hash_str_find(Z_ARRVAL_P(options), "add_path", sizeof("add_path") - 1)) != NULL) {
if (Z_TYPE_P(option) != IS_STRING) {
php_error_docref(NULL, E_WARNING, "add_path option expected to be a string");
return -1;