- Issue created by @arif.zisu
- Status changed to Activealmost 2 years ago 11:23am 31 October 2023
- 🇮🇳India arif.zisu KolkataHi @Cilefen, 
 I am getting this error from my drupal watchdog files.
- 🇮🇳India arif.zisu KolkataHi , I have applied below patch to fix this index 5ed4a4ce..95951d5e 100644 --- a/docroot/includes/path.inc +++ b/docroot/includes/path.inc @@ -328,7 +328,7 @@ function drupal_match_path($path, $patterns) { $patterns_quoted = preg_quote($patterns, '/'); $regexps[$patterns] = '/^(' . preg_replace($to_replace, $replacements, $patterns_quoted) . ')$/'; } - return (bool)preg_match($regexps[$patterns], $path); + return (bool)preg_match($regexps[$patterns], (string) $path); } /**
- Status changed to Needs workalmost 2 years ago 11:39am 7 November 2023
- Status changed to Postponed: needs infoalmost 2 years ago 2:11pm 7 November 2023
- 🇸🇰Slovakia poker10The drupal_match_path()is called only 4x in Drupal 7 core (not counting the tests):2x in path_is_admin()with argumentcurrent_path()(aka$_GET['q']), which cannot be empty/NULL.2x in block_block_list_alter()
 - the second one is using$_GET['q']as well, which cannot be NULL.
 - the first one is usingdrupal_get_path_alias($_GET['q']), but if this was the case, then you will end up with different error, as the result is used indrupal_strtolower()which also does not accept NULLs.So I think this is caused by some contrib module/custom code . As @cilefen pointed out in #4, please provide more information (like backtrace, or steps to reproduce), so that we can do anything here. Thanks!