Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
/app/captcha.php中有一处小笔误,原代码中:
图像资源变量始终使用 $img(正确的变量名)
最后误写为 imagedestroy($image)(错误的变量名),这导致 PHP 尝试销毁一个不存在的 $image 变量,引发 Undefined variable 警告和 null 参数错误。
Nginx报错信息:
每次在登录页面点击“登录”按钮都会出现一次相同的报错。
将 $image 改为 $img 后,代码会正确销毁实际存在的图像资源,两个错误都会消失。