protected function setMemoryLimit() { $inimem = ini_get('memory_limit'); $inibytes = timthumb::returnBytes($inimem); $ourbytes = timthumb::returnBytes(MEMORY_LIMIT); if ($inibytes < $ourbytes) { ini_set('memory_limit', MEMORY_LIMIT); $this->debug(3, "Increased memory from {$inimem} to " . MEMORY_LIMIT); } else { $this->debug(3, "Not adjusting memory size because the current setting is " . $inimem . " and our size of " . MEMORY_LIMIT . " is smaller."); } }
/** * timthumb::setMemoryLimit() * * @return */ protected function setMemoryLimit() { $inimem = ini_get('memory_limit'); $inibytes = timthumb::returnBytes($inimem); $ourbytes = timthumb::returnBytes(MEMORY_LIMIT); if ($inibytes < $ourbytes) { ini_set('memory_limit', MEMORY_LIMIT); } }