Repository navigation
Conversation
…ault _reduce_array() turned a blank '' into NULL for array-notation fields (address[city]). set_value() treats NULL postdata as "not posted" and returned the default, so a field the user cleared came back filled in. Plain fields have kept '' since the bcit-ci#3816 fix; this line was missed then. The NULL conversion was added for bcit-ci#113 (2012), when blank-field rule skipping only checked for NULL. _execute() has skipped both NULL and '' since 2013, so bcit-ci#113 stays fixed without it; a test now guards that. Behaviour change, for array-notation fields submitted blank only - all now match plain fields: - set_value() returns '' instead of the default - callbacks receive '' instead of NULL - matches[] between two blank fields passes instead of failing Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Status updated to applied in 18b8626, option (a). Records the NCompPOSv2 and ixaya/manager downstream scans and the upgrade note text for the release. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
NielBuys
added a commit
that referenced
this pull request
Oct 6, 2026
- CI_VERSION 3.1.13-dev -> 3.1.24; it now follows the release tag - user guide conf.py version/release and the downloads "Current version" link (now the fork's 3.1.24 archive, plus a link to earlier releases) - changelog: 3.1.24 release date Oct 7, 2026, and a note on CI_VERSION - SECURITY.md and the 3.4.5 review record the CI_VERSION decision PRs #21 (bcit-ci#6337) and #22 (bcit-ci#6335) are held for the next release. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Held out of 3.1.24, so the entry moves to the new 3.1.25 section. The review doc's status date is corrected to 2026-10-06 and its upgrade-note section now points at the changelog. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes upstream bcit-ci/CodeIgniter#6337. Full review:
docs/todo/archive/issue-6337-blank-array-field-repopulation.md.The bug
A field named with array notation (
address[city]), submitted blank and redisplayed after a validation error, showed theset_value()default instead of the blank value the user submitted. Plain fields (city) already behave correctly._reduce_array()converted''toNULL, andset_value()treatsNULLas "not posted". The conversion was a workaround for bcit-ci#113 (2012) that became redundant in 2013, when_execute()started skipping bothNULLand''. The 2015 bcit-ci#3816 fix corrected plain fields but missed this line.Change
One line removed from
_reduce_array()(plus its now-wrong comment). Array-notation fields now behave exactly like plain fields.This affects only array-notation fields submitted blank:
set_value('address[city]', 'default')'default'''NULL''matchesbetween two blank array fieldsRelease notes are generated from PR titles, so the upgrade note text in section 10 of the review doc must be added to the GitHub release by hand.
ixaya/managerrequiresnielbuys/framework ^3.1, so its users get this change oncomposer updateregardless of the version number.Downstream scans found no affected code in NCompPOSv2 or ixaya/manager 2.4.0 (details in the doc).
Tests
Four new tests in
Form_validation_test.php:set_value()on a blank array field returns'', from both the library and the helper.user[email]withvalid_emailstill passes. This guards Input fields are automatically 'required' when using other validation rules and submitting using array syntax bcit-ci/CodeIgniter#113.name[key]field receives''.matchesbetween two blank array fields passes, and fails when they differ.Without the fix, three of the four fail. The bcit-ci#113 guard passes either way, as intended. With the fix,
Form_validation_testandForm_helper_testpass (69 tests). Full suite: only the existingCalendar_test::test_generatefailure, which is also present ondevelop.🤖 Generated with Claude Code