CodeIgniter4
CodeIgniter4 copied to clipboard
fix: Update form_helper.php
Description
This PR enhances the form_open
function in the following ways:
-
Function Existence Check:
- Added a check to ensure the function
form_open
is defined only once to avoid redeclaration errors.
- Added a check to ensure the function
-
Documentation:
- Included a detailed docblock to describe the function, its parameters, and their types for better understanding and maintenance.
-
Attribute Consistency:
- Updated the method attribute to uppercase
"POST"
and adjusted the check for the 'GET' method to uppercase"GET"
to maintain consistency.
- Updated the method attribute to uppercase
-
CSRF and Charset Handling:
- Ensured that CSRF and
accept-charset
attributes are handled consistently.
- Ensured that CSRF and
The updates to the form_open
function make it work better under different conditions and make the code easier to read.
Description Explain what you have changed, and why.
Checklist:
- [x] Securely signed commits
- [ ] Component(s) with PHPDoc blocks, only if necessary or adds value
- [ ] Unit testing, with >80% coverage
- [ ] User guide updated
- [ ] Conforms to style guide