fix null strpos param (#48476)
* fix null strpos param check whether $plugin_page is set prior to passing it to strpos * Add changefile(s) from automation for the following project(s): woocommerce * Update plugins/woocommerce/src/Internal/Admin/Orders/PageController.php Co-authored-by: Darren Ethier <darren@roughsmootheng.in> * Update PageController.php fix eslint error --------- Co-authored-by: github-actions <github-actions@github.com> Co-authored-by: Darren Ethier <darren@roughsmootheng.in>
This commit is contained in:
parent
1dd10f6269
commit
972ed9eee7
|
@ -0,0 +1,4 @@
|
|||
Significance: patch
|
||||
Type: fix
|
||||
|
||||
Fix a null parameter being passed into strpos in 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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue