Properly handle NULL output start filename

This commit is contained in:
Nikita Popov 2020-10-16 18:38:03 +02:00
parent 97202d9d84
commit d6a18a7738

View File

@ -758,7 +758,7 @@ PHPAPI void php_output_set_implicit_flush(int flush)
* Get the file name where output has started */
PHPAPI const char *php_output_get_start_filename(void)
{
return ZSTR_VAL(OG(output_start_filename_str));
return OG(output_start_filename_str) ? ZSTR_VAL(OG(output_start_filename_str)) : NULL;
}
/* }}} */