Browse Source

Fixed wrong usage of old ZPP API.

pull/2584/merge
Dmitry Stogov 9 years ago
parent
commit
40ecad3402
  1. 2
      ext/curl/interface.c
  2. 2
      ext/curl/multi.c
  3. 2
      ext/filter/logical_filters.c
  4. 4
      ext/filter/sanitizing_filters.c
  5. 2
      ext/intl/converter/converter.c
  6. 8
      ext/intl/dateformat/dateformat_parse.c
  7. 3
      ext/intl/grapheme/grapheme_string.c
  8. 4
      ext/intl/spoofchecker/spoofchecker_main.c
  9. 1
      ext/soap/soap.c
  10. 1
      ext/sysvmsg/sysvmsg.c

2
ext/curl/interface.c

@ -2111,7 +2111,6 @@ static int _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue) /* {{{
CURLcode error = CURLE_OK;
zend_long lval;
ZVAL_DEREF(zvalue);
switch (option) {
/* Long options */
case CURLOPT_SSL_VERIFYHOST:
@ -2989,6 +2988,7 @@ PHP_FUNCTION(curl_setopt_array)
"Array keys must be CURLOPT constants or equivalent integer values");
RETURN_FALSE;
}
ZVAL_DEREF(entry);
if (_php_curl_setopt(ch, (zend_long) option, entry) == FAILURE) {
RETURN_FALSE;
}

2
ext/curl/multi.c

@ -339,7 +339,7 @@ PHP_FUNCTION(curl_multi_info_read)
RETURN_FALSE;
}
if (zmsgs_in_queue) {
zval_dtor(zmsgs_in_queue);
zval_ptr_dtor(zmsgs_in_queue);
ZVAL_LONG(zmsgs_in_queue, queued_msgs);
}

2
ext/filter/logical_filters.c

@ -314,7 +314,7 @@ void php_filter_boolean(PHP_INPUT_FILTER_PARAM_DECL) /* {{{ */
if (ret == -1) {
RETURN_VALIDATION_FAILED
} else {
zval_dtor(value);
zval_ptr_dtor(value);
ZVAL_BOOL(value, ret);
}
}

4
ext/filter/sanitizing_filters.c

@ -213,7 +213,7 @@ void php_filter_string(PHP_INPUT_FILTER_PARAM_DECL)
Z_STRLEN_P(value) = new_len;
if (new_len == 0) {
zval_dtor(value);
zval_ptr_dtor(value);
if (flags & FILTER_FLAG_EMPTY_STRING_NULL) {
ZVAL_NULL(value);
} else {
@ -293,7 +293,7 @@ void php_filter_unsafe_raw(PHP_INPUT_FILTER_PARAM_DECL)
php_filter_encode_html(value, enc);
} else if (flags & FILTER_FLAG_EMPTY_STRING_NULL && Z_STRLEN_P(value) == 0) {
zval_dtor(value);
zval_ptr_dtor(value);
ZVAL_NULL(value);
}
}

2
ext/intl/converter/converter.c

@ -62,7 +62,7 @@ static inline void php_converter_throw_failure(php_converter_object *objval, UEr
/* {{{ php_converter_default_callback */
static void php_converter_default_callback(zval *return_value, zval *zobj, zend_long reason, zval *error) {
ZVAL_DEREF(error);
zval_dtor(error);
zval_ptr_dtor(error);
ZVAL_LONG(error, U_ZERO_ERROR);
/* Basic functionality so children can call parent::toUCallback() */
switch (reason) {

8
ext/intl/dateformat/dateformat_parse.c

@ -135,7 +135,7 @@ PHP_FUNCTION(datefmt_parse)
DATE_FORMAT_METHOD_INIT_VARS;
/* Parse parameters. */
if( zend_parse_method_parameters( ZEND_NUM_ARGS(), getThis(), "Os|z/!",
if( zend_parse_method_parameters( ZEND_NUM_ARGS(), getThis(), "Os|z!",
&object, IntlDateFormatter_ce_ptr, &text_to_parse, &text_len, &z_parse_pos ) == FAILURE ){
intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR, "datefmt_parse: unable to parse input params", 0 );
RETURN_FALSE;
@ -145,7 +145,6 @@ PHP_FUNCTION(datefmt_parse)
DATE_FORMAT_METHOD_FETCH_OBJECT;
if (z_parse_pos) {
ZVAL_DEREF(z_parse_pos);
convert_to_long(z_parse_pos);
if (ZEND_LONG_INT_OVFL(Z_LVAL_P(z_parse_pos))) {
intl_error_set_code(NULL, U_ILLEGAL_ARGUMENT_ERROR);
@ -159,7 +158,7 @@ PHP_FUNCTION(datefmt_parse)
}
internal_parse_to_timestamp( dfo, text_to_parse, text_len, z_parse_pos?&parse_pos:NULL, return_value);
if(z_parse_pos) {
zval_dtor(z_parse_pos);
zval_ptr_dtor(z_parse_pos);
ZVAL_LONG(z_parse_pos, parse_pos);
}
}
@ -189,7 +188,6 @@ PHP_FUNCTION(datefmt_localtime)
DATE_FORMAT_METHOD_FETCH_OBJECT;
if (z_parse_pos) {
ZVAL_DEREF(z_parse_pos);
convert_to_long(z_parse_pos);
if (ZEND_LONG_INT_OVFL(Z_LVAL_P(z_parse_pos))) {
intl_error_set_code(NULL, U_ILLEGAL_ARGUMENT_ERROR);
@ -203,7 +201,7 @@ PHP_FUNCTION(datefmt_localtime)
}
internal_parse_to_localtime( dfo, text_to_parse, text_len, z_parse_pos?&parse_pos:NULL, return_value);
if (z_parse_pos) {
zval_dtor(z_parse_pos);
zval_ptr_dtor(z_parse_pos);
ZVAL_LONG(z_parse_pos, parse_pos);
}
}

3
ext/intl/grapheme/grapheme_string.c

@ -804,8 +804,7 @@ PHP_FUNCTION(grapheme_extract)
} else {
ZVAL_DEREF(next);
/* initialize next */
SEPARATE_ZVAL_NOREF(next);
zval_dtor(next);
zval_ptr_dtor(next);
ZVAL_LONG(next, lstart);
}
}

4
ext/intl/spoofchecker/spoofchecker_main.c

@ -46,7 +46,7 @@ PHP_METHOD(Spoofchecker, isSuspicious)
}
if (error_code) {
zval_dtor(error_code);
zval_ptr_dtor(error_code);
ZVAL_LONG(error_code, ret);
}
RETVAL_BOOL(ret != 0);
@ -81,7 +81,7 @@ PHP_METHOD(Spoofchecker, areConfusable)
}
if (error_code) {
zval_dtor(error_code);
zval_ptr_dtor(error_code);
ZVAL_LONG(error_code, ret);
}
RETVAL_BOOL(ret != 0);

1
ext/soap/soap.c

@ -2952,6 +2952,7 @@ PHP_METHOD(SoapClient, __call)
} ZEND_HASH_FOREACH_END();
}
if (output_headers) {
zval_ptr_dtor(output_headers);
array_init(output_headers);
}
do_soap_call(execute_data, this_ptr, function, function_len, arg_count, real_args, return_value, location, soap_action, uri, soap_headers, output_headers);

1
ext/sysvmsg/sysvmsg.c

@ -469,6 +469,7 @@ PHP_FUNCTION(msg_send)
if (result == -1) {
php_error_docref(NULL, E_WARNING, "msgsnd failed: %s", strerror(errno));
if (zerror) {
zval_ptr_dtor(zerror);
ZVAL_LONG(zerror, errno);
}
} else {

Loading…
Cancel
Save