- fix builds where include/php/ext/iconv does not have php_have_*.h files
[m6w6/ext-http] / http_querystring_object.c
index d7d3000937fddf9f72b5ba74f1e2c53a3b189311..6a3f0f30ff9cae302c3eb2a1f597cfdc1ea6e61f 100644 (file)
@@ -21,8 +21,9 @@
 #include "zend_interfaces.h"
 
 #ifdef HAVE_ICONV
-#      include "ext/standard/url.h"
+#      undef PHP_ATOM_INC
 #      include "ext/iconv/php_iconv.h"
+#      include "ext/standard/url.h"
 #endif
 
 #include "php_http_api.h"
@@ -338,7 +339,9 @@ PHP_METHOD(HttpQueryString, __construct)
        zval *params = NULL, *qarray = NULL, *qstring = NULL, **_GET, **_SERVER, **QUERY_STRING;
        
        SET_EH_THROW_HTTP();
-       if (SUCCESS == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|bz", &global, &params)) {
+       if (!sapi_module.treat_data) {
+               http_error(HE_ERROR, HTTP_E_QUERYSTRING, "The SAPI does not have a treat_data function registered");
+       } else if (SUCCESS == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|bz", &global, &params)) {
                if (global) {
                        if (    (SUCCESS == zend_hash_find(&EG(symbol_table), "_SERVER", sizeof("_SERVER"), (void **) &_SERVER)) &&
                                        (Z_TYPE_PP(_SERVER) == IS_ARRAY) &&