久久久久av_欧美日韩一区二区在线_国产精品三区四区_日韩中字在线

mt_rand(): Argument #2 ($max) must be greater than or equal to argument #1 ($min)

2677 6 1提示:支持鍵盤翻頁<-左 右-> datou 發表于 2023-4-8 16:33 帖子模式

頻繁出現 Discuz! X3.5 Release 20230316 PHP8.2 discuz后臺 工具 ? 運行記錄 ? 系統錯誤 mt_rand(): Argument #2 ($max) must be greater than or equal to argument #1 ($min) PHP:misc.php#require(%s):0096 s ... 查看全文

    組圖打開中,請稍候......

評論6個評論

datou發表于  2023-5-5 17:01:22
1314學習網 發表于 2023-4-23 09:31
source\class\class_seccode.php
找到

謝謝樓上的大神,您的方法解決了此問題。
1314學習網發表于  2023-4-23 09:31:54
source\class\class_seccode.php
找到
  1. $y = mt_rand(0, $this->height - $font[$i]['height']);
復制代碼

修改為
  1. $y = mt_rand(0, max(0, $this->height - $font[$i]['height']));
復制代碼
湖中沉發表于  2023-4-9 09:45:03
datou 發表于 2023-4-8 17:39
在php 7.4環境 無此報錯

PHP8本來的改進就是要求更嚴格,所以不需要對比PHP7.X版本。你這個報錯的問題在于后臺驗證碼那個位置設置不正確導致的
datou發表于  2023-4-8 17:39:54
在php 7.4環境 無此報錯
hipass發表于  2023-4-8 16:49:36
錯誤的原因是“mt_rand()”函數的第二個參數(max)必須大于或等于第一個參數(min),source/class/class_seccode.php”文件的第309行mt_rand()由于 min 大于max 這個條件不成立,因此程序出現了錯誤
  • 關注公眾號
  • 有償服務微信
  • 有償服務QQ

手機版|小黑屋|Discuz! 官方交流社區 ( 皖ICP備16010102號 |皖公網安備34010302002376號 )|網站地圖|star

GMT+8, 2025-7-4 01:20 , Processed in 0.063948 second(s), 13 queries , Redis On.

Powered by Discuz! W1.0 Licensed

Cpoyright © 2001-2025 Discuz! Team.

關燈 在本版發帖
有償服務QQ
有償服務微信
返回頂部
快速回復 返回頂部 返回列表