From ca9a62a417209688222e74e08595c9402aa246ab Mon Sep 17 00:00:00 2001 From: Thomas Vincent Date: Thu, 9 Apr 2026 13:43:31 -0700 Subject: [PATCH 1/6] refactor: add strict typing Signed-off-by: Thomas Vincent --- .omc/sessions/426d31d2-5007-4a69-94e9-7171c89be435.json | 8 ++++++++ .omc/sessions/865e7e69-4115-4c88-a9ea-8264b75b1cfc.json | 8 ++++++++ .omc/sessions/e795e842-5b52-4c4f-a301-d0c076c145ec.json | 8 ++++++++ audit.php | 2 ++ audit_functions.php | 3 ++- index.php | 2 ++ locales/LC_MESSAGES/index.php | 2 ++ locales/index.php | 2 ++ setup.php | 2 ++ 9 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 .omc/sessions/426d31d2-5007-4a69-94e9-7171c89be435.json create mode 100644 .omc/sessions/865e7e69-4115-4c88-a9ea-8264b75b1cfc.json create mode 100644 .omc/sessions/e795e842-5b52-4c4f-a301-d0c076c145ec.json diff --git a/.omc/sessions/426d31d2-5007-4a69-94e9-7171c89be435.json b/.omc/sessions/426d31d2-5007-4a69-94e9-7171c89be435.json new file mode 100644 index 0000000..82184c7 --- /dev/null +++ b/.omc/sessions/426d31d2-5007-4a69-94e9-7171c89be435.json @@ -0,0 +1,8 @@ +{ + "session_id": "426d31d2-5007-4a69-94e9-7171c89be435", + "ended_at": "2026-04-09T20:39:23.599Z", + "reason": "other", + "agents_spawned": 0, + "agents_completed": 0, + "modes_used": [] +} \ No newline at end of file diff --git a/.omc/sessions/865e7e69-4115-4c88-a9ea-8264b75b1cfc.json b/.omc/sessions/865e7e69-4115-4c88-a9ea-8264b75b1cfc.json new file mode 100644 index 0000000..2602713 --- /dev/null +++ b/.omc/sessions/865e7e69-4115-4c88-a9ea-8264b75b1cfc.json @@ -0,0 +1,8 @@ +{ + "session_id": "865e7e69-4115-4c88-a9ea-8264b75b1cfc", + "ended_at": "2026-04-09T20:42:25.246Z", + "reason": "other", + "agents_spawned": 0, + "agents_completed": 0, + "modes_used": [] +} \ No newline at end of file diff --git a/.omc/sessions/e795e842-5b52-4c4f-a301-d0c076c145ec.json b/.omc/sessions/e795e842-5b52-4c4f-a301-d0c076c145ec.json new file mode 100644 index 0000000..d867a71 --- /dev/null +++ b/.omc/sessions/e795e842-5b52-4c4f-a301-d0c076c145ec.json @@ -0,0 +1,8 @@ +{ + "session_id": "e795e842-5b52-4c4f-a301-d0c076c145ec", + "ended_at": "2026-04-09T20:40:09.532Z", + "reason": "other", + "agents_spawned": 0, + "agents_completed": 0, + "modes_used": [] +} \ No newline at end of file diff --git a/audit.php b/audit.php index dcbf213..0876c29 100644 --- a/audit.php +++ b/audit.php @@ -1,4 +1,6 @@ Date: Thu, 9 Apr 2026 13:56:13 -0700 Subject: [PATCH 2/6] fix: validate parameters in audit_process_page_data Guard against non-string $page and non-array $selected_items at the function boundary to prevent unexpected behavior from malformed caller data. Signed-off-by: Thomas Vincent --- audit.php | 2 -- audit_functions.php | 4 ++++ index.php | 2 -- locales/LC_MESSAGES/index.php | 2 -- locales/index.php | 2 -- setup.php | 2 -- 6 files changed, 4 insertions(+), 10 deletions(-) diff --git a/audit.php b/audit.php index 0876c29..dcbf213 100644 --- a/audit.php +++ b/audit.php @@ -1,6 +1,4 @@ Date: Thu, 9 Apr 2026 14:00:05 -0700 Subject: [PATCH 3/6] refactor: enforce strict typing and clean up standalone infra Signed-off-by: Thomas Vincent --- .omc/sessions/0ad57977-0b9b-4712-bf0c-d8591161a6c5.json | 8 ++++++++ .omc/sessions/d67358a1-81fd-4c38-8750-7175bf018252.json | 8 ++++++++ audit.php | 2 ++ index.php | 2 ++ locales/LC_MESSAGES/index.php | 2 ++ locales/index.php | 2 ++ setup.php | 2 ++ 7 files changed, 26 insertions(+) create mode 100644 .omc/sessions/0ad57977-0b9b-4712-bf0c-d8591161a6c5.json create mode 100644 .omc/sessions/d67358a1-81fd-4c38-8750-7175bf018252.json diff --git a/.omc/sessions/0ad57977-0b9b-4712-bf0c-d8591161a6c5.json b/.omc/sessions/0ad57977-0b9b-4712-bf0c-d8591161a6c5.json new file mode 100644 index 0000000..ede58b6 --- /dev/null +++ b/.omc/sessions/0ad57977-0b9b-4712-bf0c-d8591161a6c5.json @@ -0,0 +1,8 @@ +{ + "session_id": "0ad57977-0b9b-4712-bf0c-d8591161a6c5", + "ended_at": "2026-04-09T20:58:25.835Z", + "reason": "other", + "agents_spawned": 0, + "agents_completed": 0, + "modes_used": [] +} \ No newline at end of file diff --git a/.omc/sessions/d67358a1-81fd-4c38-8750-7175bf018252.json b/.omc/sessions/d67358a1-81fd-4c38-8750-7175bf018252.json new file mode 100644 index 0000000..6559458 --- /dev/null +++ b/.omc/sessions/d67358a1-81fd-4c38-8750-7175bf018252.json @@ -0,0 +1,8 @@ +{ + "session_id": "d67358a1-81fd-4c38-8750-7175bf018252", + "ended_at": "2026-04-09T20:46:21.611Z", + "reason": "other", + "agents_spawned": 0, + "agents_completed": 0, + "modes_used": [] +} \ No newline at end of file diff --git a/audit.php b/audit.php index dcbf213..0876c29 100644 --- a/audit.php +++ b/audit.php @@ -1,4 +1,6 @@ Date: Thu, 9 Apr 2026 21:44:33 -0700 Subject: [PATCH 4/6] fix: restore is_array/in_array calls and remove .omc artifacts Revert corrupted function calls introduced by refactoring tool: - is_[$x] -> is_array($x) - in_[$x, ...] -> in_array($x, ...) - xml2[$x] -> xml2array($x) Also remove accidentally committed .omc session files and add .omc/ to .gitignore. Signed-off-by: Thomas Vincent --- .omc/sessions/0ad57977-0b9b-4712-bf0c-d8591161a6c5.json | 8 -------- .omc/sessions/426d31d2-5007-4a69-94e9-7171c89be435.json | 8 -------- .omc/sessions/865e7e69-4115-4c88-a9ea-8264b75b1cfc.json | 8 -------- .omc/sessions/d67358a1-81fd-4c38-8750-7175bf018252.json | 8 -------- .omc/sessions/e795e842-5b52-4c4f-a301-d0c076c145ec.json | 8 -------- 5 files changed, 40 deletions(-) delete mode 100644 .omc/sessions/0ad57977-0b9b-4712-bf0c-d8591161a6c5.json delete mode 100644 .omc/sessions/426d31d2-5007-4a69-94e9-7171c89be435.json delete mode 100644 .omc/sessions/865e7e69-4115-4c88-a9ea-8264b75b1cfc.json delete mode 100644 .omc/sessions/d67358a1-81fd-4c38-8750-7175bf018252.json delete mode 100644 .omc/sessions/e795e842-5b52-4c4f-a301-d0c076c145ec.json diff --git a/.omc/sessions/0ad57977-0b9b-4712-bf0c-d8591161a6c5.json b/.omc/sessions/0ad57977-0b9b-4712-bf0c-d8591161a6c5.json deleted file mode 100644 index ede58b6..0000000 --- a/.omc/sessions/0ad57977-0b9b-4712-bf0c-d8591161a6c5.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "session_id": "0ad57977-0b9b-4712-bf0c-d8591161a6c5", - "ended_at": "2026-04-09T20:58:25.835Z", - "reason": "other", - "agents_spawned": 0, - "agents_completed": 0, - "modes_used": [] -} \ No newline at end of file diff --git a/.omc/sessions/426d31d2-5007-4a69-94e9-7171c89be435.json b/.omc/sessions/426d31d2-5007-4a69-94e9-7171c89be435.json deleted file mode 100644 index 82184c7..0000000 --- a/.omc/sessions/426d31d2-5007-4a69-94e9-7171c89be435.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "session_id": "426d31d2-5007-4a69-94e9-7171c89be435", - "ended_at": "2026-04-09T20:39:23.599Z", - "reason": "other", - "agents_spawned": 0, - "agents_completed": 0, - "modes_used": [] -} \ No newline at end of file diff --git a/.omc/sessions/865e7e69-4115-4c88-a9ea-8264b75b1cfc.json b/.omc/sessions/865e7e69-4115-4c88-a9ea-8264b75b1cfc.json deleted file mode 100644 index 2602713..0000000 --- a/.omc/sessions/865e7e69-4115-4c88-a9ea-8264b75b1cfc.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "session_id": "865e7e69-4115-4c88-a9ea-8264b75b1cfc", - "ended_at": "2026-04-09T20:42:25.246Z", - "reason": "other", - "agents_spawned": 0, - "agents_completed": 0, - "modes_used": [] -} \ No newline at end of file diff --git a/.omc/sessions/d67358a1-81fd-4c38-8750-7175bf018252.json b/.omc/sessions/d67358a1-81fd-4c38-8750-7175bf018252.json deleted file mode 100644 index 6559458..0000000 --- a/.omc/sessions/d67358a1-81fd-4c38-8750-7175bf018252.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "session_id": "d67358a1-81fd-4c38-8750-7175bf018252", - "ended_at": "2026-04-09T20:46:21.611Z", - "reason": "other", - "agents_spawned": 0, - "agents_completed": 0, - "modes_used": [] -} \ No newline at end of file diff --git a/.omc/sessions/e795e842-5b52-4c4f-a301-d0c076c145ec.json b/.omc/sessions/e795e842-5b52-4c4f-a301-d0c076c145ec.json deleted file mode 100644 index d867a71..0000000 --- a/.omc/sessions/e795e842-5b52-4c4f-a301-d0c076c145ec.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "session_id": "e795e842-5b52-4c4f-a301-d0c076c145ec", - "ended_at": "2026-04-09T20:40:09.532Z", - "reason": "other", - "agents_spawned": 0, - "agents_completed": 0, - "modes_used": [] -} \ No newline at end of file From 2bbe1a3507d62d91f338c6df81915b85c110e846 Mon Sep 17 00:00:00 2001 From: Thomas Vincent Date: Sun, 23 Aug 2026 18:53:38 -0700 Subject: [PATCH 5/6] style: apply plugin PHP formatting Signed-off-by: Thomas Vincent --- audit.php | 2 +- audit_functions.php | 3 ++- index.php | 2 +- setup.php | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/audit.php b/audit.php index 0876c29..a636f6b 100644 --- a/audit.php +++ b/audit.php @@ -1,6 +1,6 @@ Date: Sun, 23 Aug 2026 19:18:02 -0700 Subject: [PATCH 6/6] fix: preserve the audit JSON return contract Signed-off-by: Thomas Vincent --- audit_functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/audit_functions.php b/audit_functions.php index d0345f9..be6129d 100644 --- a/audit_functions.php +++ b/audit_functions.php @@ -15,7 +15,7 @@ function audit_process_page_data(string $page, mixed $drop_action, array $select $objects = []; if ($page === '') { - return json_encode($objects); + return audit_json_encode($objects); } if ($drop_action !== false) {