กรุณาปิด โปรแกรมบล๊อกโฆษณา เพราะเราอยู่ได้ด้วยโฆษณาที่ท่านเห็น
Please close the adblock program. Because we can live with the ads you see


คำถาม error when upgrade to php 8.1

  • เริ่มกระทู้โดย เริ่มกระทู้โดย thom
  • วันที่เริ่มกระทู้ วันที่เริ่มกระทู้

thom

VIP Member
Registered
error this

Code:
An exception occurred: [ErrorException] [E_DEPRECATED] hash_hmac(): Passing null to parameter #3 ($key) of type string is deprecated in src/XF/App.php on line 1418

XF::handlePhpError()
hash_hmac() in src/XF/App.php at line 1418
XF\App->XF\{closure}() in src/XF/Template/Templater.php at line 372
XF\Template\Templater->getCssValidationKey() in src/XF/Template/Templater.php at line 354
XF\Template\Templater->getCssLoadUrl() in src/XF/Mvc/Renderer/Html.php at line 95
XF\Mvc\Renderer\Html->postFilter() in src/XF/Mvc/Dispatcher.php at line 405
XF\Mvc\Dispatcher->render() in src/XF/Mvc/Dispatcher.php at line 60
XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2482
XF\App->run() in src/XF.php at line 525
XF::runApp() in index.php at line 20
 
error this

Code:
An exception occurred: [ErrorException] [E_DEPRECATED] hash_hmac(): Passing null to parameter #3 ($key) of type string is deprecated in src/XF/App.php on line 1418

XF::handlePhpError()
hash_hmac() in src/XF/App.php at line 1418
XF\App->XF\{closure}() in src/XF/Template/Templater.php at line 372
XF\Template\Templater->getCssValidationKey() in src/XF/Template/Templater.php at line 354
XF\Template\Templater->getCssLoadUrl() in src/XF/Mvc/Renderer/Html.php at line 95
XF\Mvc\Renderer\Html->postFilter() in src/XF/Mvc/Dispatcher.php at line 405
XF\Mvc\Dispatcher->render() in src/XF/Mvc/Dispatcher.php at line 60
XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2482
XF\App->run() in src/XF.php at line 525
XF::runApp() in index.php at line 20
ข้อผิดพลาดนี้เกี่ยวข้องกับการส่งค่าว่างสําหรับพารามิเตอร์ $key ในฟังก์ชัน hash_hmac() PHP สิ่งนี้เลิกใช้แล้วใน PHP 8.1 และทําให้เกิดข้อผิดพลาด

ในการแก้ไขปัญหานี้ คุณต้องอัปเดตโค้ดในไฟล์ src/XF/App.php ในบรรทัดที่ 1418 เพื่อให้แน่ใจว่าสตริงที่ถูกต้องจะถูกส่งผ่านสําหรับพารามิเตอร์ $key แทนที่จะเป็น null

คุณยังสามารถพิจารณาอัปเกรดเป็น XenForo เวอร์ชันล่าสุดที่รองรับ PHP 8.1 เพื่อหลีกเลี่ยงปัญหานี้โดยสิ้นเชิง ตรวจสอบให้แน่ใจว่าได้สํารองข้อมูลไซต์ของคุณก่อนทําการอัปเดตใดๆ เนื่องจากอาจทําให้เกิดปัญหาอื่นๆ กับการติดตั้งของคุณ
 

กรุณาปิด โปรแกรมบล๊อกโฆษณา เพราะเราอยู่ได้ด้วยโฆษณาที่ท่านเห็น
Please close the adblock program. Because we can live with the ads you see


Similar threads

  • บทความ บทความ
ตอบ
0
อ่าน
2K
ตอบ
0
อ่าน
5K



กรุณาปิด โปรแกรมบล๊อกโฆษณา เพราะเราอยู่ได้ด้วยโฆษณาที่ท่านเห็น
Please close the adblock program. Because we can live with the ads you see
ด้านบน ด้านล่าง