Commit cba08698 authored by Carsten  Rose's avatar Carsten Rose
Browse files

Check that 'php*_intl' is installed.

AbstractException.php: Add catch CodeException to not recursively throw the same exception again and again.
Store.php: constructor of class Store seems to be the best place to do the check.
parent b6c8128a
......@@ -159,6 +159,7 @@ const ERROR_SENDMAIL = 1071;
const ERROR_SENDMAIL_MISSING_VALUE = 1072;
const ERROR_OVERWRITE_RECORD_ID = 1073;
const ERROR_MISSING_SLAVE_ID_DEFINITION = 1074;
const ERROR_MISSING_INTL = 1075;
// Subrecord
const ERROR_SUBRECORD_MISSING_COLUMN_ID = 1100;
......
......@@ -113,7 +113,11 @@ class QuickFormQuery {
* As a result of instantiating of Form, the class Store will initially called the first time and therefore instantiated automatically.
* Store might throw an exception, in case the URL-passed SIP is invalid.
*
* @param string $bodytext
* @param array $t3data
* @param bool $phpUnit
* @throws CodeException
* @throws UserFormException
* @internal param string $bodytext
*/
public function __construct(array $t3data = array(), $phpUnit = false) {
......
......@@ -25,12 +25,15 @@ class AbstractException extends \Exception {
* @return string
*/
public function formatException() {
$debug = '';
try {
// In a very early stage, it might be possible that Store can't be initialized: take care not to use it.
$store = Store::getInstance();
} catch (UserFormException $e) {
$store = null;
} catch (CodeException $e) {
$store = null;
}
$html = '';
......
......@@ -86,6 +86,11 @@ class Store {
// self::$session = Session::getInstance(self::$phpUnit);
// This check is critical for some unwanted exception recursion during startup.
if(!function_exists('normalizer_normalize')) {
throw new CodeException("Function normalizer_normalize() not found - Please install 'php5-intl' / 'php7.0-intl'", ERROR_MISSING_INTL );
}
self::$sanitizeClass = [
// TYPO3_DEBUG_LOAD => SANITIZE_ALLOW_DIGIT,
// TYPO3_DEBUG_SAVE => SANITIZE_ALLOW_DIGIT,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment