You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
qtranslate-xt: Version 3.15.2 (latest)
Woocommerce: Version 8.1.1 (latest) PHP Fatal error: Uncaught TypeError: QTX_Module_Slugs::get_page_by_path(): Argument #1 ($page_path) must be of type string, null given, called in /qtranslate-xt/src/modules/slugs/slugs.php on line 438 and defined in /qtranslate-xt/src/modules/slugs/slugs.php:1039
This happens on a Woocommerce Shop page (special product archive page) when the product filter is used and add parameters to the url.
ex: store/?orderby=popularity&paged=1 $query['product'] doesn't exist in this specific case on line 437.
I see the code was changed last week, but not released yet. #1363
The change will prevent the fatal error, but still leave a warning.
Warning: Undefined array key "product" in /qtranslate-xt/src/modules/slugs/slugs.php on line 441 441: $page_slug = $query['name'] ?? $query[ $query['post_type'] ];
adding another null check would fix the problem for the future release 441: $page_slug = $query['name'] ?? $query[ $query['post_type'] ] ?? null;
The text was updated successfully, but these errors were encountered:
@spleen1981 I never submitted a PR before. I assumed it was easier to let the people already working on the project make the necessary change if they thought it was necessary.
qtranslate-xt: Version 3.15.2 (latest)
Woocommerce: Version 8.1.1 (latest)
PHP Fatal error: Uncaught TypeError: QTX_Module_Slugs::get_page_by_path(): Argument #1 ($page_path) must be of type string, null given, called in /qtranslate-xt/src/modules/slugs/slugs.php on line 438 and defined in /qtranslate-xt/src/modules/slugs/slugs.php:1039
This happens on a Woocommerce Shop page (special product archive page) when the product filter is used and add parameters to the url.
ex: store/?orderby=popularity&paged=1
$query['product']
doesn't exist in this specific case on line 437.I see the code was changed last week, but not released yet. #1363
The change will prevent the fatal error, but still leave a warning.
Warning: Undefined array key "product" in /qtranslate-xt/src/modules/slugs/slugs.php on line 441
441: $page_slug = $query['name'] ?? $query[ $query['post_type'] ];
adding another null check would fix the problem for the future release
441: $page_slug = $query['name'] ?? $query[ $query['post_type'] ] ?? null;
The text was updated successfully, but these errors were encountered: