Fix lỗi "Assigning the return value of new by reference is deprecated" tại PHP 5.3

Bạn gặp những lỗi như thế này:
 

Deprecated: Assigning the return value of new by reference is deprecated in /home/vinastar.net/domains/vinastar.net/public_html/admin/tkb_application/code_base/Common.php on line 130 Deprecated: Assigning the return value of new by reference is deprecated in in /home/vinastar.net/domains/vinastar.net/public_html/admin/tkb_application/code_base/Common.php on line 136


Cách xử lý như sau, bạn hãy mở file lỗi ra, tìm đến dòng nó báo warning, ở đây là:

Common.php on line 136

tìm dòng có cấu trúc như (thủ thuật: hãy tìm những dòng có ký tự "&"):
Code:

$tên_biến = & new abc;

Bạn bỏ kí tự "&" đi là hết lỗi thôi.
Chúc bạn thành công

Bài viết này có ích cho bạn không? 0 phiếu cảm nhận dễ hiểu & thực hiện (0 Phiếu)