diff --git a/plugins/woocommerce/changelog/48476-fix-null-strpos-44598 b/plugins/woocommerce/changelog/48476-fix-null-strpos-44598 new file mode 100644 index 00000000000..c9efcea5e4c --- /dev/null +++ b/plugins/woocommerce/changelog/48476-fix-null-strpos-44598 @@ -0,0 +1,4 @@ +Significance: patch +Type: fix + +Fix a null parameter being passed into strpos in Admin/Orders/PageController.php diff --git a/plugins/woocommerce/src/Internal/Admin/Orders/PageController.php b/plugins/woocommerce/src/Internal/Admin/Orders/PageController.php index 125b3d6e098..3f55f80910e 100644 --- a/plugins/woocommerce/src/Internal/Admin/Orders/PageController.php +++ b/plugins/woocommerce/src/Internal/Admin/Orders/PageController.php @@ -143,7 +143,7 @@ class PageController { } // Not on an Orders page. - if ( 'admin.php' !== $pagenow || 0 !== strpos( $plugin_page, 'wc-orders' ) ) { + if ( empty( $plugin_page ) || 'admin.php' !== $pagenow || 0 !== strpos( $plugin_page, 'wc-orders' ) ) { return; }