diff options
author | Max Romanov <max.romanov@nginx.com> | 2020-07-23 14:24:16 +0300 |
---|---|---|
committer | Max Romanov <max.romanov@nginx.com> | 2020-07-23 14:24:16 +0300 |
commit | fa696569f9e2c8d3d286eb14891c0adc797200d8 (patch) | |
tree | 670a9de25835a20fe11be25efdca10433f60ac96 /src | |
parent | 661c223eda641eeb2ee02db3d1e1cd4e5cd583f7 (diff) | |
download | unit-fa696569f9e2c8d3d286eb14891c0adc797200d8.tar.gz unit-fa696569f9e2c8d3d286eb14891c0adc797200d8.tar.bz2 |
PHP: removing assertion to fix build on macOS.
The nxt_assert macro uses nxt_thread_context, which caused the following linker
error when using it in the library:
ld: illegal thread local variable reference to regular symbol
_nxt_thread_context for architecture x86_64
Diffstat (limited to '')
-rw-r--r-- | src/nxt_php_sapi.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/nxt_php_sapi.c b/src/nxt_php_sapi.c index ee0976ce..767dcaec 100644 --- a/src/nxt_php_sapi.c +++ b/src/nxt_php_sapi.c @@ -707,7 +707,11 @@ nxt_php_dirname(const nxt_str_t *file, nxt_str_t *dir) { size_t length; - nxt_assert(file->length > 0 && file->start[0] == '/'); + if (file->length == 0 || file->start[0] != '/') { + nxt_unit_alert(NULL, "php_dirname: invalid file name " + "(not starts from '/')"); + return NXT_ERROR; + } length = file->length; |