| modification, are permitted provided that the conditions mentioned |
| in the accompanying LICENSE file are met. |
+--------------------------------------------------------------------+
- | Copyright (c) 2004-2011, Michael Wallner <mike@php.net> |
+ | Copyright (c) 2004-2014, Michael Wallner <mike@php.net> |
+--------------------------------------------------------------------+
*/
}
}
- if (q && Z_DVAL_PP(q)) {
+ if (q && Z_DVAL_PP(q) > 0) {
Z_ADDREF_PP(q);
zend_hash_update(result, Z_STRVAL_P(supported), Z_STRLEN_P(supported) + 1, (void *) q, sizeof(zval *), NULL);
}
return ZEND_HASH_APPLY_KEEP;
}
-PHP_HTTP_API HashTable *php_http_negotiate(const char *value_str, size_t value_len, HashTable *supported, const char *primary_sep_str, size_t primary_sep_len TSRMLS_DC)
+HashTable *php_http_negotiate(const char *value_str, size_t value_len, HashTable *supported, const char *primary_sep_str, size_t primary_sep_len TSRMLS_DC)
{
HashTable *result = NULL;
q = Z_DVAL_P(tmp);
zval_ptr_dtor(&tmp);
-
- if (0&&!q) {
- STR_FREE(key.str);
- continue;
- }
} else {
q = 1.0 - ++i / 100.0;
}
add_index_double(&arr, key.num, q);
}
- STR_FREE(key.str);
+ PTR_FREE(key.str);
}
#if 0