summaryrefslogtreecommitdiff
path: root/sapi/cli/php_cli_server.c
diff options
context:
space:
mode:
authorAdam Harvey <aharvey@php.net>2015-01-06 01:27:37 +0000
committerAdam Harvey <aharvey@php.net>2015-01-06 01:27:37 +0000
commit27ff425b78a1355a24d44eb719291ebd9022bc87 (patch)
tree82e135b0e14397272bf28ff13548c13d7ce9c8dd /sapi/cli/php_cli_server.c
parent4756207e7ef9fcaa80039f5cf2f6b8f8935bf66b (diff)
parent448ef30f75988384b84cdb88bbb3a1a56b9534da (diff)
downloadphp-git-27ff425b78a1355a24d44eb719291ebd9022bc87.tar.gz
Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5: 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/tests/php_cli_server.inc
Diffstat (limited to 'sapi/cli/php_cli_server.c')
-rw-r--r--sapi/cli/php_cli_server.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sapi/cli/php_cli_server.c b/sapi/cli/php_cli_server.c
index f7f1c2bae0..8bfe6772f0 100644
--- a/sapi/cli/php_cli_server.c
+++ b/sapi/cli/php_cli_server.c
@@ -708,6 +708,11 @@ static void sapi_cli_server_register_variable(zval *track_vars_array, const char
{
char *new_val = (char *)val;
uint 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);
}