From 579a0093ac16e28902bf747e3c4a225b6db8f733 Mon Sep 17 00:00:00 2001 From: Alex Barth <alex_b@53995.no-reply.drupal.org> Date: Thu, 30 Sep 2010 19:50:08 +0000 Subject: [PATCH] #923318: Fix Fatal error: Call to a member function import() on a non-object occuring on cron. --- CHANGELOG.txt | 2 ++ feeds.module | 2 ++ includes/FeedsSource.inc | 1 + 3 files changed, 5 insertions(+) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 1b6b3094..073ad4ce 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -3,6 +3,8 @@ Feeds 7.x 2.0 XXXXXXXXXXXXXXXXXXX --------------------------------- +- #923318: Fix Fatal error: Call to a member function import() on a non-object + occuring on cron. - Clean up basic settings form. - Make getConfig() include configuration defaults. diff --git a/feeds.module b/feeds.module index 92166f42..ae097316 100644 --- a/feeds.module +++ b/feeds.module @@ -79,6 +79,7 @@ function feeds_source_import($job) { try { $source->existing()->import(); } + catch (FeedsNotExistingException $e) {} catch (Exception $e) { watchdog('feeds_source_import()', $e->getMessage(), array(), WATCHDOG_ERROR); } @@ -93,6 +94,7 @@ function feeds_importer_expire($job) { try { $importer->existing()->expire(); } + catch (FeedsNotExistingException $e) {} catch (Exception $e) { watchdog('feeds_importer_expire()', $e->getMessage(), array(), WATCHDOG_ERROR); } diff --git a/includes/FeedsSource.inc b/includes/FeedsSource.inc index 90f2f8ef..f044d146 100644 --- a/includes/FeedsSource.inc +++ b/includes/FeedsSource.inc @@ -422,6 +422,7 @@ class FeedsSource extends FeedsConfigurable { $this->importer->existing(); return parent::existing(); } + throw new FeedsNotExistingException(t('Source configuration not valid.')); } /** -- GitLab