“Warning: Use of undefined constant madeini” – with solution
-
If your web host has upgraded PHP to version 7.2, and you are using the Madeini theme, you will get messages like this in the beginning of every page of your website, and you won’t even be able to access the administration interface on /wp-admin:
“Warning: Use of undefined constant madeini – assumed ‘madeini’ (this will throw an Error in a future version of PHP) in /var/www/example.com/public_html/wp-content/themes/madeini/functions.php on line 371
Warning: Use of undefined constant madeini – assumed ‘madeini’ (this will throw an Error in a future version of PHP) in /var/www/example.com/public_html/wp-content/themes/madeini/functions.php on line 380
Warning: Use of undefined constant madeini – assumed ‘madeini’ (this will throw an Error in a future version of PHP) in /var/www/example.com/public_html/wp-content/themes/madeini/functions.php on line 381
Warning: Use of undefined constant madeini – assumed ‘madeini’ (this will throw an Error in a future version of PHP) in /var/www/example.com/public_html/wp-content/themes/madeini/functions.php on line 382
Warning: Use of undefined constant madeini – assumed ‘madeini’ (this will throw an Error in a future version of PHP) in /var/www/example.com/public_html/wp-content/themes/madeini/functions.php on line 383
Warning: Use of undefined constant madeini – assumed ‘madeini’ (this will throw an Error in a future version of PHP) in /var/www/example.com/public_html/wp-content/themes/madeini/functions.php on line 394
Warning: Use of undefined constant madeini – assumed ‘madeini’ (this will throw an Error in a future version of PHP) in /var/www/example.com/public_html/wp-content/themes/madeini/functions.php on line 395
Warning: Use of undefined constant madeini – assumed ‘madeini’ (this will throw an Error in a future version of PHP) in /var/www/example.com/public_html/wp-content/themes/madeini/functions.php on line 396”
The solution is simple: Every occurrence of the plain word “madeini” on the 8 mentioned lines in the file /wp-content/themes/madeini/functions.php should be changed to “‘madeini'” (e.g., adding a single quote before and after madeini). The functions.php file can be accessed via FTP.
I just did this on one affected website, and the website works perfectly now.
If the developer of madeini is still present, they could also correct this, of course.
But even if this is fixed by the original developer, anyone who already has the problem will likely still have to go through FTP to fix it, as they cannot even access the admin interface to update the theme.
- The topic ‘“Warning: Use of undefined constant madeini” – with solution’ is closed to new replies.