Example #1
0
 static function InitClass()
 {
     wpfb_loadclass("Admin", "GetID3", "FileUtils", "Misc");
     require_once ABSPATH . 'wp-admin/includes/file.php';
     @ini_set('max_execution_time', '0');
     @set_time_limit(0);
     self::$error_log_file = WPFB_Core::GetLogFile('sync');
     @ini_set("error_log", self::$error_log_file);
     set_error_handler(array(__CLASS__, 'CaptureError'));
     set_exception_handler(array(__CLASS__, 'CaptureException'));
     register_shutdown_function(array(__CLASS__, 'CaptureShutdown'));
     if (self::$debug_output = !empty($_GET['output']) || !empty($_GET['debug'])) {
         @ini_set('display_errors', 1);
         @error_reporting(E_ALL);
     }
     // raise memory limit if needed
     if (WPFB_Misc::ParseIniFileSize(ini_get('memory_limit')) < 64000000) {
         @ini_set('memory_limit', '128M');
         @ini_set('memory_limit', '256M');
         @ini_set('memory_limit', '512M');
     }
 }