Home / Admin / Fatal “Class ‘Normalizer’ not found” on the Posts and Pages screens with the Gmail mailer and All in One SEO
Duplicate Snippet

Embed Snippet on Your Site

Fatal “Class ‘Normalizer’ not found” on the Posts and Pages screens with the Gmail mailer and All in One SEO

Since 4.10.0, sites using the Gmail mailer alongside All in One SEO on a host without the PHP intl extension get a critical error on the Posts list, the Pages list and the post editor.

<10
Code Preview
php
<?php
// WP Mail SMTP 4.10.0: stop the "Class 'Normalizer' not found" fatal on hosts without PHP intl.
// Remove once the plugin update with the fix is installed, or once intl is enabled.
if ( ! extension_loaded( 'intl' ) && ! class_exists( 'Normalizer', false ) ) {
	class Normalizer {
		const FORM_D  = 4;
		const FORM_KD = 8;
		const FORM_C  = 16;
		const FORM_KC = 32;
		const NFD     = 4;
		const NFKD    = 8;
		const NFC     = 16;
		const NFKC    = 32;
		public static function isNormalized( $string, $form = self::FORM_C ) {
			return true;
		}
		public static function normalize( $string, $form = self::FORM_C ) {
			return $string;
		}
	}
}

Comments

Add a Comment