Hey there – My website has been running great for a few years now and without any recent WordPress update or change of any kind, I suddenly ended with an error shutting down the whole website
(the site worked fine just 2 days ago and the PHP file hasn’t been edited since 2015 so nothing should have changed at all):
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or ‘}’ in /home/xxxxxx/www/wp-includes/locale.php on line 21
I tried muting line 21 (public $weekday;) with a /\* but the error only moves to line 34 (public $weekday\_initial;)
I am not tech savvy and have no idea how to resolve this.. any tips?
​
<?php
/**
* Date and Time Locale object
*
* u/package WordPress
* u/subpackage i18n
*/
/**
* Class that loads the calendar locale.
*
* u/since 2.1.0
*/
class WP_Locale {
/**
* Stores the translated strings for the full weekday names.
*
* u/since 2.1.0
* u/var array
*/
public $weekday;
/**
* Stores the translated strings for the one character weekday names.
*
* There is a hack to make sure that Tuesday and Thursday, as well
* as Sunday and Saturday, don’t conflict. See init() method for more.
*
* u/see WP_Locale::init() for how to handle the hack.
*
* u/since 2.1.0
* u/var array
*/
public $weekday_initial;
Any help would be greatly appreciated, I can share the website link if requested (not sure if it’s ok by the sub-admins here)
That’s part of the WordPress core. My suggestions are to try updating or copy/pasting that file from another install on your version of WordPress.