Skip to content

Resolved Code Checker Errors#3

Open
Juan-Pablo-Castillo-Velasquez wants to merge 6 commits into
open-lms-open-source:MOODLE_401_STABLEfrom
Juan-Pablo-Castillo-Velasquez:error_codeChecker
Open

Resolved Code Checker Errors#3
Juan-Pablo-Castillo-Velasquez wants to merge 6 commits into
open-lms-open-source:MOODLE_401_STABLEfrom
Juan-Pablo-Castillo-Velasquez:error_codeChecker

Conversation

@Juan-Pablo-Castillo-Velasquez

@Juan-Pablo-Castillo-Velasquez Juan-Pablo-Castillo-Velasquez commented Dec 28, 2023

Copy link
Copy Markdown

1. Fixed syntax in code formatting
2. Removed extra newline after the opening PHP tag.
3. Fixed array syntax issues
4. Updated htmlentities flags to ENT_QUOTES
Adding ENT_QUOTES to htmlentities enhances security by converting both single and double quotes to HTML entities, preventing potential security issues related to character encoding.
5. Replaced sizeof() with count().
This change is due to the deprecation of sizeof(), and it's recommended to use count() instead. Both functions essentially do the same thing, but using count() is a more modern and preferred practice.
https://stackoverflow.com/questions/3974385/php-array-count-or-sizeof
6. Removed extra space in the switch break statement

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant