Index: includes/common.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/common.inc,v
retrieving revision 1.611.2.20
diff -u -p -r1.611.2.20 common.inc
--- includes/common.inc	9 Jul 2008 19:34:30 -0000	1.611.2.20
+++ includes/common.inc	13 Aug 2008 08:26:33 -0000
@@ -2004,7 +2004,7 @@ function drupal_mail($mailkey, $to, $sub
  */
 function drupal_cron_run() {
   // If not in 'safe mode', increase the maximum execution time:
-  if (!ini_get('safe_mode')) {
+  if (!ini_get('safe_mode') && function_exists('set_time_limit')) {
     set_time_limit(240);
   }
 
Index: includes/locale.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/locale.inc,v
retrieving revision 1.105.2.5
diff -u -p -r1.105.2.5 locale.inc
--- includes/locale.inc	17 Dec 2007 01:53:52 -0000	1.105.2.5
+++ includes/locale.inc	13 Aug 2008 08:26:34 -0000
@@ -464,7 +464,7 @@ function _locale_string_delete($lid) {
  */
 function _locale_import_po($file, $lang, $mode) {
   // If not in 'safe mode', increase the maximum execution time:
-  if (!ini_get('safe_mode')) {
+  if (!ini_get('safe_mode') && function_exists('set_time_limit')) {
     set_time_limit(240);
   }
 
Index: modules/node/node.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/node/node.module,v
retrieving revision 1.776.2.30
diff -u -p -r1.776.2.30 node.module
--- modules/node/node.module	16 Jul 2008 19:04:21 -0000	1.776.2.30
+++ modules/node/node.module	13 Aug 2008 08:26:36 -0000
@@ -3004,7 +3004,7 @@ function node_access_rebuild() {
   // only recalculate if site is using a node_access module
   if (count(module_implements('node_grants'))) {
     // If not in 'safe mode', increase the maximum execution time:
-    if (!ini_get('safe_mode')) {
+    if (!ini_get('safe_mode') && function_exists('set_time_limit')) {
       set_time_limit(240);
     }
     $result = db_query("SELECT nid FROM {node}");
