/** * Ensures a certain Memory limit for php (if server supports it) * @author Max Milbers * @param int $minMemory */ static function ensureMemoryLimit($minMemory = 0) { if ($minMemory === 0) { $minMemory = tsmConfig::get('minMemory', '128M'); } $memory_limit = tsmConfig::getMemoryLimit(); if ($memory_limit < $minMemory) { @ini_set('memory_limit', $minMemory . 'M'); } }