Posted by setvik on June 4, 2009 at 6:45am
Jump to:
| Project: | Boost |
| Version: | 6.x-1.0-beta1 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
In boost_cache_expire_derivative(), the following code:
#path redirects
if (module_exists('path_redirect')){
$path_redirects = boost_path_redirect_load(array('redirect' => $path));
}
#flush caches
boost_cache_expire($path_alias, $wildcard);
foreach($path_redirects as $path_redirect) {
boost_cache_expire($path_redirect['path'], $wildcard );
}Results in "warning: Invalid argument supplied for foreach() in /www/beta4/httpdocs/sites/all/modules/boost/boost.module on line 513"
if the path_redirect module is not installed.
To fix, initialize $path_redirects to an empty array or wrap the foreach in an "if (isset(..."
See patch for latter solution.
| Attachment | Size |
|---|---|
| boost.invalidargument.patch | 551 bytes |
Comments
#1
Tested & looks good. Thanks for supplying the patch!
#2
committed
#3
Hi,
confirming the issue in Drupal 6.12 with 6.x-1.0-beta1. The patch applies cleanly and works as advertised.
Thanks & greetings, -asb
#4
Automatically closed -- issue fixed for 2 weeks with no activity.