From 023de6e550d8dc955a8b3bdc76da17b6e8dd9999 Mon Sep 17 00:00:00 2001 From: Jordan Dukart Date: Thu, 27 Apr 2017 17:09:34 -0300 Subject: [PATCH] Don't use a constant not defined in earlier PHPs. (#674) --- islandora.module | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/islandora.module b/islandora.module index e060ce12..ff919ef7 100644 --- a/islandora.module +++ b/islandora.module @@ -2094,8 +2094,8 @@ function islandora_conditionally_clear_cache() { // batches, since they are not in response to GUI actions. '_batch_process' => 'islandora_schedule_cache_clear_for_batch', ); - - foreach (debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS & ~DEBUG_BACKTRACE_PROVIDE_OBJECT) as $frame) { + $options = (version_compare(PHP_VERSION, '5.3.6', '>=') ? DEBUG_BACKTRACE_IGNORE_ARGS & ~DEBUG_BACKTRACE_PROVIDE_OBJECT : FALSE); + foreach (debug_backtrace($options) as $frame) { $function_name = strtolower($frame['function']); if (isset($functions[$function_name])) { $clear = TRUE;