If your site went down right after the last Polylang update with this error:
PHP Fatal error: Uncaught TypeError: Cannot assign null to property WP_Syntex\Polylang\Switcher\Element\Abstract_Element::$locale of type string in .../plugins/polylang/src/Switcher/Element/Abstract_Element.php:158
Enter fullscreen mode
Exit fullscreen mode
…then it is not your theme, and it is not a broken update in the usual sense. One language row on your site is missing its locale , and 3.9.x turned that silent bad row into a fatal.
I traced it through the 3.9.1 source. Three lines matter.
1. The typed property that fails
src/Switcher/Element/Abstract_Element.php
public string $locale ; // line 47
$this -> locale = $language -> get_locale ( 'display' ); // line 158
Enter fullscreen mode
Exit fullscreen mode
get_locale( 'display' ) returns $this->w3c ( src/language.php:608 ). If w3c is null , assigning it to a string property is a TypeError, and TypeErrors are fatal.
2.…