]> git.wh0rd.org Git - tt-rss.git/commitdiff
update function: only call pcntl_alarm() if it is defined
authorAndrew Dolgov <fox@bah.spb.su>
Sun, 24 Feb 2008 11:34:32 +0000 (12:34 +0100)
committerAndrew Dolgov <fox@bah.spb.su>
Sun, 24 Feb 2008 11:34:32 +0000 (12:34 +0100)
functions.php

index b4a540e7ead8d598b7ff0b56b90d02fde47b6748..06d7e7a74c60bb22786fab37b87e91125cd6d830 100644 (file)
 
                        // We setup a alarm to alert if the feed take more than 300s to update.
                        // => HANG alarm.
-                       if(!$from_http) pcntl_alarm(300);
+                       if(!$from_http && function_exists('pcntl_alarm')) pcntl_alarm(300);
                        update_rss_feed($link, $line["feed_url"], $line["id"], true);
                        // Cancel the alarm (the update went well)
-                       if(!$from_http) pcntl_alarm(0);
+                       if(!$from_http && function_exists('pcntl_alarm')) pcntl_alarm(0);
 
                        sleep(1); // prevent flood (FIXME make this an option?)
                }