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
This commit is contained in:
Max Romanov
2020-07-23 14:24:16 +03:00
parent 661c223eda
commit fa696569f9

View File

@@ -707,7 +707,11 @@ nxt_php_dirname(const nxt_str_t *file, nxt_str_t *dir)
{ {
size_t length; 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; length = file->length;