From 89b9aceb02a3168ada453d163a0c6861af6d539d Mon Sep 17 00:00:00 2001 From: "mohammed.razzaq" Date: Fri, 26 Jan 2024 14:47:32 +0530 Subject: [PATCH 1/5] Fix: Only variables should be passed by reference --- includes/admin/class-bc-admin-labels-page.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/admin/class-bc-admin-labels-page.php b/includes/admin/class-bc-admin-labels-page.php index 395636e7..d95a38ae 100644 --- a/includes/admin/class-bc-admin-labels-page.php +++ b/includes/admin/class-bc-admin-labels-page.php @@ -52,7 +52,7 @@ public function render_edit_label_page() { - +

From 8b0bb8b6304d8731629448f60343dde349966bbd Mon Sep 17 00:00:00 2001 From: "mohammed.razzaq" Date: Thu, 15 Feb 2024 17:17:42 +0530 Subject: [PATCH 2/5] Assign the value to a variable --- includes/admin/class-bc-admin-labels-page.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/includes/admin/class-bc-admin-labels-page.php b/includes/admin/class-bc-admin-labels-page.php index d95a38ae..a06475fb 100644 --- a/includes/admin/class-bc-admin-labels-page.php +++ b/includes/admin/class-bc-admin-labels-page.php @@ -35,6 +35,7 @@ public function __construct() { * Renders html of the edit labels page */ public function render_edit_label_page() { + $label_name = $_GET['update_label'] ?? ''; ?>

@@ -46,13 +47,13 @@ public function render_edit_label_page() {
- + - + From 4e0a24b27e964e09feace421f7d0cf2d4b11acb8 Mon Sep 17 00:00:00 2001 From: "mohammed.razzaq" Date: Thu, 15 Feb 2024 17:52:18 +0530 Subject: [PATCH 3/5] PHP5 compatibility --- includes/admin/class-bc-admin-labels-page.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/admin/class-bc-admin-labels-page.php b/includes/admin/class-bc-admin-labels-page.php index a06475fb..d675e86c 100644 --- a/includes/admin/class-bc-admin-labels-page.php +++ b/includes/admin/class-bc-admin-labels-page.php @@ -35,7 +35,7 @@ public function __construct() { * Renders html of the edit labels page */ public function render_edit_label_page() { - $label_name = $_GET['update_label'] ?? ''; + $label_name = isset( $_GET['update_label'] ) ? $_GET['update_label'] : ''; ?>

From bc77f97e6e107c2f0c2978818d55580e0c4a12ad Mon Sep 17 00:00:00 2001 From: "mohammed.razzaq" Date: Thu, 15 Feb 2024 18:17:55 +0530 Subject: [PATCH 4/5] Fix lint issues --- includes/admin/class-bc-admin-labels-page.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/admin/class-bc-admin-labels-page.php b/includes/admin/class-bc-admin-labels-page.php index d675e86c..a774accf 100644 --- a/includes/admin/class-bc-admin-labels-page.php +++ b/includes/admin/class-bc-admin-labels-page.php @@ -35,7 +35,7 @@ public function __construct() { * Renders html of the edit labels page */ public function render_edit_label_page() { - $label_name = isset( $_GET['update_label'] ) ? $_GET['update_label'] : ''; + $label_name = isset( $_GET['update_label'] ) ? $_GET['update_label'] : ''; // phpcs:ignore WordPress.Security.NonceVerification ?>

@@ -47,7 +47,7 @@ public function render_edit_label_page() { - +

- +

From 28f9217e5c2b46ce79b947b1b64c3792c29508c5 Mon Sep 17 00:00:00 2001 From: "mohammed.razzaq" Date: Thu, 15 Feb 2024 18:31:53 +0530 Subject: [PATCH 5/5] Add feedback --- includes/admin/class-bc-admin-labels-page.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/admin/class-bc-admin-labels-page.php b/includes/admin/class-bc-admin-labels-page.php index a774accf..9b7a1a3f 100644 --- a/includes/admin/class-bc-admin-labels-page.php +++ b/includes/admin/class-bc-admin-labels-page.php @@ -53,7 +53,7 @@ public function render_edit_label_page() {
- +