I have this error too, only that something inside wordpress changes my display_errors setting, so I see this on my site sometimes because it’s cached.
This seems to happen when a client doesn’t set the HTTP_ACCEPT_LANGUAGE
header. Probably search engines. The fix is to check that the variable exists before using it. Here’s a patch:
--- a/wp-content/plugins/wc-fields-factory/includes/wcff-locale.php 2018-04-26 11:22:44.217060270 +0200
+++ b/wp-content/plugins/wc-fields-factory/includes/wcff-locale.php 2018-04-26 11:26:04.829774539 +0200
@@ -206,10 +206,10 @@
public function detrmine_current_locale() {
$locale = "en";
/* Locale from Browser */
- if(function_exists("locale_accept_from_http")) {
- $locale = locale_accept_from_http($_SERVER['HTTP_ACCEPT_LANGUAGE']);
- } else {
- if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
+ if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
+ if(function_exists("locale_accept_from_http")) {
+ $locale = locale_accept_from_http($_SERVER['HTTP_ACCEPT_LANGUAGE']);
+ } else {
$locale = $_SERVER['HTTP_ACCEPT_LANGUAGE'];
}
}