How to fix and hidden Warning/ Notices: error in WordPress

Đăng ký tài khoản kiếm tiền với tiếp thị liên kết tại ACCESSTRADE, MasOffer, Lazada Việt Nam

Sometime your site make any mistake by code or value: variable is empty, null, themes error, plugins error… WordPress may be display them in your screen. Some times, it is terrible.

How to fix?

You need to check your code and fix them.

Follow message your get, see path file make issue. Open the file with editor and fix it. Usually message error display because variable name get null or empty value. For resolve you need check null/ empty or set default value.

Example:

Warning: Cannot assign an empty string to a string offset in /home/PolyXGO.com/public_html/wp-content/themes/fmmspolygon/options/crawler/sync_data.php on line 16

My code at line 16 is: $this->item[‘url’]=”;

It is normal for empty value but I get a warning by WordPress. So, I will set a default value (if I can) or try{} catch(){} for fix it.

Repeat action for fix all message your get.

How to hidden?

If you are not developer, you can hidden them. For do that, you need to put below config in wp-config.php. Sometime it is ok or no.

define('WP_DEBUG', false);

Refresh website if do not change, update again with below config.

ini_set('log_errors','On');
ini_set('display_errors','Off');
ini_set('error_reporting', E_ALL );
define('WP_DEBUG', false);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);

And then, everything ok with your site, good luck!

Đánh giá bài chia sẻ
Nếu bạn mong muốn tìm hiểu rõ hơn về chia sẻ này và những chia sẻ khác, bạn có thể kết nối với mình qua các thông tin sau:
Facebook cá nhân: https://www.facebook.com/PExpress
Blog chia sẻ cá nhân: PolygonExpress.com
Group chia sẻ ứng dụng affiliate marketing & services: MMO tools
Web dịch vụ freelance: FMMSPolygon.com
Email liên hệ mình: fmmspolygon@gmail.com
Điện thoại: 0937.798.420 - 0868.929.024 (Kim Ngọc)

Related

Leave a Reply

Your email address will not be published. Required fields are marked *