Add checks for safe mode, as set_time_limit can't be used in safe mode

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@40593 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Andrew O'Neil 2007-08-20 23:01:17 +00:00
parent 15d03ffdef
commit 8d7494ff20
2 changed files with 6 additions and 3 deletions

View File

@ -2,8 +2,9 @@
class QueuedEmailDispatchTask extends DailyTask {
public function process() {
set_time_limit(0);
if(ini_get("safe_mode") != "1") {
set_time_limit(0);
}
echo "SENDING QUEUED EMAILS\n";

View File

@ -9,7 +9,9 @@ class GD extends Object {
function __construct($filename = null) {
// If we're working with image resampling, things could take a while. Bump up the time-limit
set_time_limit(300);
if(ini_get("safe_mode") != "1") {
set_time_limit(300);
}
if($filename) {
// We use getimagesize instead of extension checking, because sometimes extensions are wrong.