Repository navigation
Conversation
N6REJ
commented
Oct 5, 2026
- Add early return with error logging when file operations fail in replaceInFile()
- Preserve line endings consistently by detecting and reapplying original CRLF/LF format
- Return empty array instead of false from getVersionList() when directory cannot be opened
- Add validation for version string length in getVersionList() to prevent empty suffixes
- Check for target file at start path before recursing in findReposFromRoot()
- Add null coalescing to prevent iteration over false values in getFolderList() calls
- Replace is_numeric() with filter_var() for stricter port validation
- Add error handling for JSON decode failures in getLatestVersion()
- Use null coalescing operator for safer array access in GitHub API response
- Add caption sanitization and file write validation in openFileContent()
- Add error logging and empty array fallback when module folder scanning fails
- Fix clearFolder() to propagate file count and close directory handle on error
- Replace bit shift operators with exponentiation for size unit calculations
- Add early return with error logging when file operations fail in replaceInFile() - Preserve line endings consistently by detecting and reapplying original CRLF/LF format - Return empty array instead of false from getVersionList() when directory cannot be opened - Add validation for version string length in getVersionList() to prevent empty suffixes - Check for target file at start path before recursing in findReposFromRoot() - Add null coalescing to prevent iteration over false values in getFolderList() calls - Replace is_numeric() with filter_var() for stricter port validation - Add error handling for JSON decode failures in getLatestVersion() - Use null coalescing operator for safer array access in GitHub API response - Add caption sanitization and file write validation in openFileContent() - Add error logging and empty array fallback when module folder scanning fails - Fix clearFolder() to propagate file count and close directory handle on error - Replace bit shift operators with exponentiation for size unit calculations
PR Summary by QodoHarden utility methods against invalid input and filesystem failures
AI Description
Diagram
High-Level Assessment
Files changed (2)
|
Code Review by Qodo
1.
|
Enhance file scanning and path validation to prevent incomplete scans from corrupting configuration updates. Introduce explicit failure detection in getPathsToScan() when module folders cannot be read, propagating false instead of empty arrays to distinguish scan failures from legitimately empty directories. Add folderList() wrapper to track failed directory reads and prevent silent data loss. Update getFilesToScan() to abort and skip caching when path discovery fails, ensuring incomplete results never poison subsequent operations. Modify startup and reload actions to detect scan failures and skip path updates rather than rewriting files with partial data. Refactor port validation to accept leading zeros (e.g., '080') by validating as decimal digits before range check, aligning with Apache's is_numeric() behavior. Consolidate port validation logic in Util::isValidPort() and update sanitizePort() to use shared rule with improved logging.