PHP Version
8.1, 8.2
CodeIgniter4 Version
4.2.6
CodeIgniter4 Installation Method
Manual (zip or tar.gz)
Which operating systems have you tested for this bug?
macOS, Windows, Linux
Which server did you use?
apache
Database
MySQL 5.6
What happened?
When you try to use the Validation library, with an SVG image plus the max_dims rule, the function getimagesize tries to get the dimensions of the SVG image, but there are no dimensions for that type.
That returns a Trying to access array offset on value of type bool error in the line 245 in the FileRules.php file.
Steps to Reproduce
Upload an SVG using the form validation rules with mime_in accepting SVG type and max_dims set.
Expected Output
The function detects if there are dimensions in the uploaded image and if not, skip the getimagesize check.
Anything else?
No response
PHP Version
8.1, 8.2
CodeIgniter4 Version
4.2.6
CodeIgniter4 Installation Method
Manual (zip or tar.gz)
Which operating systems have you tested for this bug?
macOS, Windows, Linux
Which server did you use?
apache
Database
MySQL 5.6
What happened?
When you try to use the Validation library, with an SVG image plus the max_dims rule, the function getimagesize tries to get the dimensions of the SVG image, but there are no dimensions for that type.
That returns a Trying to access array offset on value of type bool error in the line 245 in the FileRules.php file.
Steps to Reproduce
Upload an SVG using the form validation rules with mime_in accepting SVG type and max_dims set.
Expected Output
The function detects if there are dimensions in the uploaded image and if not, skip the getimagesize check.
Anything else?
No response