TYPO3 CMS  TYPO3_6-2
PhpOptionsUtility.php
Go to the documentation of this file.
1 <?php
2 namespace TYPO3\CMS\Core\Utility;
3 
22 
29  static public function isSafeModeEnabled() {
31  if (version_compare(phpversion(), '5.4', '<')) {
32  return self::getIniValueBoolean('safe_mode');
33  }
34  return FALSE;
35  }
36 
43  static public function isMagicQuotesGpcEnabled() {
45  if (version_compare(phpversion(), '5.4', '<')) {
46  return self::getIniValueBoolean('magic_quotes_gpc');
47  }
48  return FALSE;
49  }
50 
57  static public function isSqlSafeModeEnabled() {
59  return self::getIniValueBoolean('sql.safe_mode');
60  }
61 
67  static public function isSessionAutoStartEnabled() {
68  return self::getIniValueBoolean('session.auto_start');
69  }
70 
77  static public function getIniValueBoolean($configOption) {
78  return filter_var(ini_get($configOption), FILTER_VALIDATE_BOOLEAN, array(FILTER_REQUIRE_SCALAR, FILTER_NULL_ON_FAILURE));
79  }
80 
81 }