Handle NULL strings gracefully during constant registration 70/head
authorMichael Heimpold <mhei@heimpold.de>
Sun, 4 Jun 2017 13:00:33 +0000 (15:00 +0200)
committerMichael Heimpold <mhei@heimpold.de>
Sun, 4 Jun 2017 13:00:33 +0000 (15:00 +0200)
commitab5b4e3acd2b0379e5d8bc95a8d4f83ce5c91fb7
treef6e27f5e4c17b6def5b0fab846e0b4a3c3fd2cc0
parentf019b225f947d2046f144d901d1b9a0585b4d5b6
Handle NULL strings gracefully during constant registration

When libcurl is compiled not using e.g. libz or SSL, then a call to
curl_version_info could return NULL in the corresponding fields of
curl_version_info_data.

Passing such NULL pointers down to REGISTER_NS_STRING_CONSTANT results
in a segfault during php startup, so let's check for this special case
and register a NULL constant in this case.

Signed-off-by: Michael Heimpold <mhei@heimpold.de>
src/php_http_client_curl.c