Пример #1
0
 /**
  * Replacement function for the original {@link get_magic_quotes_gpc()}.
  * Use this function to avoid E_DEPRECATED warnings.
  *
  * @return bool Returns the current setting.
  */
 public static function getGpc()
 {
     if (self::$magicQuotesGPC === null) {
         if (!function_exists('get_magic_quotes_gpc')) {
             self::$magicQuotesGPC = false;
         } elseif (version_compare(PHP_VERSION, '5.3.0') < 0) {
             self::$magicQuotesGPC = get_magic_quotes_gpc();
         } else {
             self::$magicQuotesGPC = Util::iniGetBool('magic_quotes_gpc');
             if (self::$magicQuotesGPC === null) {
                 self::$magicQuotesGPC = @get_magic_quotes_gpc();
             }
         }
     }
     return self::$magicQuotesGPC;
 }