Fixed building the PHP 5 module with ZTS, broken by dab8544b5440.

This closes #525 issue on GitHub.
This commit is contained in:
Valentin Bartenev
2021-03-15 15:03:32 +03:00
parent 4c261a7ff8
commit 99337728ed
2 changed files with 11 additions and 0 deletions

View File

@@ -43,6 +43,13 @@ the Ruby module didn't respect user locale for defaults in the Encoding class.
</para>
</change>
<change type="bugfix">
<para>
the PHP 5 module failed to build with thread safety enabled; the bug had
appeared in 1.22.0.
</para>
</change>
</changes>

View File

@@ -1041,7 +1041,11 @@ nxt_php_execute(nxt_php_run_ctx_t *ctx, nxt_unit_request_t *r)
if (r->authorization_field != NXT_UNIT_NONE_FIELD) {
f = r->fields + r->authorization_field;
#ifdef NXT_PHP7
php_handle_auth_data(nxt_unit_sptr_get(&f->value));
#else
php_handle_auth_data(nxt_unit_sptr_get(&f->value) TSRMLS_CC);
#endif
} else {
SG(request_info).auth_digest = NULL;