Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
sapi/phpdbg: restore the DEFAULT_SLASH check on the module path
The move to memchr() in GH-21578 left both halves of the condition looking
for '/', so on Windows a path given with backslashes is not recognised as a
path and extension_dir gets prepended to it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
  • Loading branch information
2 people authored and Rant committed Sep 5, 2026
commit afd8c660027f5a0ceec594bd131824478c4a3d5e
2 changes: 1 addition & 1 deletion sapi/phpdbg/phpdbg_prompt.c
Original file line number Diff line number Diff line change
Expand Up @@ -1192,7 +1192,7 @@ static const char *phpdbg_load_module_or_extension(zend_string **path, const cha
phpdbg_error("extension_dir ini setting contains a nul byte");
return NULL;
}
if (memchr(ZSTR_VAL(*path), '/', ZSTR_LEN(*path)) != NULL || memchr(ZSTR_VAL(*path), '/', ZSTR_LEN(*path)) != NULL) {
if (memchr(ZSTR_VAL(*path), '/', ZSTR_LEN(*path)) != NULL || memchr(ZSTR_VAL(*path), DEFAULT_SLASH, ZSTR_LEN(*path)) != NULL) {
/* path is fine */
} else if (extension_dir && ZSTR_LEN(extension_dir) > 0) {
zend_string *libpath;
Expand Down
Loading