CodeIgniter4 icon indicating copy to clipboard operation
CodeIgniter4 copied to clipboard

fix: Update form_helper.php

Open virginus01 opened this issue 9 months ago • 2 comments

Description

This PR enhances the form_open function in the following ways:

  1. Function Existence Check:

    • Added a check to ensure the function form_open is defined only once to avoid redeclaration errors.
  2. Documentation:

    • Included a detailed docblock to describe the function, its parameters, and their types for better understanding and maintenance.
  3. Attribute Consistency:

    • Updated the method attribute to uppercase "POST" and adjusted the check for the 'GET' method to uppercase "GET" to maintain consistency.
  4. CSRF and Charset Handling:

    • Ensured that CSRF and accept-charset attributes are handled consistently.

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

virginus01 avatar May 18 '24 10:05 virginus01