summaryrefslogtreecommitdiff
path: root/sapi/cli/php_cli_server.c
diff options
context:
space:
mode:
authorAdam Harvey <aharvey@php.net>2015-01-06 01:29:40 +0000
committerAdam Harvey <aharvey@php.net>2015-01-06 01:29:40 +0000
commita607a1db1d16f62feac06c136c1bf435c3e55a9d (patch)
treec85e179ce8d6a09df12ba9f3143c540e090b933b /sapi/cli/php_cli_server.c
parentbb7ceb046eb5f0d5fa25066a3d7f9b4eb8cc3c93 (diff)
parent27ff425b78a1355a24d44eb719291ebd9022bc87 (diff)
downloadphp-git-a607a1db1d16f62feac06c136c1bf435c3e55a9d.tar.gz
Merge branch 'PHP-5.6'
* 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
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 143d433d54..f46b5763fa 100644
--- a/sapi/cli/php_cli_server.c
+++ b/sapi/cli/php_cli_server.c
@@ -588,6 +588,11 @@ static void sapi_cli_server_register_variable(zval *track_vars_array, const char
{
char *new_val = (char *)val;
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)) {
php_register_variable_safe((char *)key, new_val, new_val_len, track_vars_array);
}