Skip to content

Update serialized string parser to prevent null array keys#3177

Merged
Crabcyborg merged 1 commit into
masterfrom
update_serialized_string_parser_to_prevent_null_array_keys
Jul 3, 2026
Merged

Update serialized string parser to prevent null array keys#3177
Crabcyborg merged 1 commit into
masterfrom
update_serialized_string_parser_to_prevent_null_array_keys

Conversation

@Crabcyborg

@Crabcyborg Crabcyborg commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

I believe it's trying to parse an invalid string. This update ignores a null array key since that isn't valid.

PHP Deprecated: Using null as an array offset is deprecated, use an empty string instead in .../formidable/classes/helpers/FrmSerializedStringParserHelper.php on line 142

Summary by CodeRabbit

  • Bug Fixes
    • Improved handling of parsed serialized keys by skipping entries with invalid or null keys, preventing unexpected values from being added.

@coderabbitai

coderabbitai Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 262c1fe9-fbe5-4d5f-897a-45aef6237272

📥 Commits

Reviewing files that changed from the base of the PR and between 4d7b13f and 49f9595.

📒 Files selected for processing (1)
  • classes/helpers/FrmSerializedStringParserHelper.php

📝 Walkthrough

Walkthrough

A single conditional check in FrmSerializedStringParserHelper::parse_array() was updated to also exclude null array keys from value assignment, in addition to the existing exclusion of array-type keys.

Changes

Serialized String Parsing Fix

Layer / File(s) Summary
Guard against null array key
classes/helpers/FrmSerializedStringParserHelper.php
The condition for assigning $val[$array_key] = $array_value now also requires $array_key to be non-null, in addition to being non-array.

Estimated code review effort: 1 (Trivial) | ~3 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: the serialized string parser now ignores null array keys.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch update_serialized_string_parser_to_prevent_null_array_keys

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@deepsource-io

deepsource-io Bot commented Jul 3, 2026

Copy link
Copy Markdown

DeepSource Code Review

We reviewed changes in 4d7b13f...49f9595 on this pull request. Below is the summary for the review, and you can see the individual issues we found as inline review comments.

See full review on DeepSource ↗

PR Report Card

Overall Grade   Security  

Reliability  

Complexity  

Hygiene  

Code Review Summary

Analyzer Status Updated (UTC) Details
PHP Jul 3, 2026 1:44p.m. Review ↗
JavaScript Jul 3, 2026 1:44p.m. Review ↗

Important

AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.

@Crabcyborg
Crabcyborg merged commit f92019b into master Jul 3, 2026
45 of 48 checks passed
@Crabcyborg
Crabcyborg deleted the update_serialized_string_parser_to_prevent_null_array_keys branch July 3, 2026 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant