summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcammchugh2014-12-11 11:27:33 (GMT)
committerSpleshka2014-12-11 11:27:33 (GMT)
commitaf2f57b21e3561bee900bab5d9f8f444a0d3c112 (patch)
treea9e21e550d02739c57dd3526e26def6b63b8fb7b
parentf724c073073228119a19da3b4142f440313f23cf (diff)
Issue #2390947 by cammchugh, Spleshka: hook_expire_cache invoked with empty list of urls
-rw-r--r--includes/expire.api.inc6
1 files changed, 6 insertions, 0 deletions
diff --git a/includes/expire.api.inc b/includes/expire.api.inc
index cd4acc6..2d52ae0 100644
--- a/includes/expire.api.inc
+++ b/includes/expire.api.inc
@@ -101,6 +101,12 @@ class ExpireAPI {
// Latest possibility to change urls that should be expired.
drupal_alter('expire_urls', $urls, $object_type, $object);
+ // Probably during alteration all urls were deleted. In this case
+ // we should stop any further expiration.
+ if (empty($urls)) {
+ return;
+ }
+
// Write some debug information.
self::debugLog($urls, $wildcards, $object_type);