- Issue created by @Baysaa
- Status changed to Needs review
6 months ago 5:11pm 3 July 2024 - Status changed to Fixed
6 months ago 7:57am 9 July 2024 Automatically closed - issue fixed for 2 weeks with no activity.
In AlttextAi::getDescription() When `$path` is empty but `ALTTEXT_AI_FORCE_IMAGE_UPLOAD` is not set, the logic breaks down and attempts to base64_encode a boolean `FALSE`.
Change
`if(empty($path) && !empty(getenv('ALTTEXT_AI_FORCE_IMAGE_UPLOAD'))) {`
to
`if(empty($path) || !empty(getenv('ALTTEXT_AI_FORCE_IMAGE_UPLOAD'))) {`
If either condition in the if statement is true, then we should go forth, to prevent passing `FALSE` to file_get_contents and ultimately to base64_encode.
Fixed
2.0
Code
Automatically closed - issue fixed for 2 weeks with no activity.