]> granicus.if.org Git - php/commitdiff
Merge branch 'PHP-5.6'
authorAdam Harvey <aharvey@php.net>
Tue, 6 Jan 2015 01:29:40 +0000 (01:29 +0000)
committerAdam Harvey <aharvey@php.net>
Tue, 6 Jan 2015 01:29:40 +0000 (01:29 +0000)
* PHP-5.6:
  Handle NULL strings in sapi_cli_server_register_variable().
  Allow CLI server test scripts to specify the name of the router file.

Conflicts:
sapi/cli/php_cli_server.c

1  2 
sapi/cli/php_cli_server.c
sapi/cli/tests/bug61977.phpt

index 143d433d54c8eec27210b95d53dc2cb49f44aa47,8bfe6772f0da301adc8c6a7a6fde8634e008fa17..f46b5763fafad9c812e00bb48a6f323467778059
@@@ -584,12 -704,17 +584,17 @@@ static size_t sapi_cli_server_read_post
        return 0;
  } /* }}} */
  
 -static void sapi_cli_server_register_variable(zval *track_vars_array, const char *key, const char *val TSRMLS_DC) /* {{{ */
 +static void sapi_cli_server_register_variable(zval *track_vars_array, const char *key, const char *val) /* {{{ */
  {
        char *new_val = (char *)val;
 -      uint new_val_len;
 +      size_t new_val_len;
+       if (NULL == val) {
+               return;
+       }
 -      if (sapi_module.input_filter(PARSE_SERVER, (char*)key, &new_val, strlen(val), &new_val_len TSRMLS_CC)) {
 -              php_register_variable_safe((char *)key, new_val, new_val_len, track_vars_array TSRMLS_CC);
 +      if (sapi_module.input_filter(PARSE_SERVER, (char*)key, &new_val, strlen(val), &new_val_len)) {
 +              php_register_variable_safe((char *)key, new_val, new_val_len, track_vars_array);
        }
  } /* }}} */
  
Simple merge