solutionweb

WordPress Common Errors and Solutions

Fix php warning: use of undefined constant GMT–assured’ GMT (this will throw an error in a future version of PHP).

Recently, I made various optimizations for website SEO, including website map. When I checked sitemap.xml, I found that php reported an error. The warning prompt “warning: use of undefined constant GMT–assured’ GMT’ (this will throw an error in a future version of PHP)” appears.
Fix php warning: use of undefined constant GMT–assured’ GMT (this will throw an error in a future version of PHP).

Fix this php warning
After checking, it was found that php7.2 changed the writing format of constants, which caused the error. The solution is as follows:

First, open the file that reported the error and find the line of code that reported the error.


Second, enclose GMT in double quotation marks, save it and upload it to the website.


Third, it is normal to reopen sitemap.

Fix php warning: use of undefined constant GMT–assured’ GMT (this will throw an error in a future version of PHP).
Sitemap error repair

Back to top