Latest *.dev from http://drupalcode.org/project/advagg.git
Nasty PHP E' Notice which adds many entries to php & drupal error *.log (one for every page and about 70 for a basic advagg rebuild):
<strong>Notice: Undefined index: all in advagg_process_css() (line 1670 of advagg.module)</strong>
*Fix* (edit the advagg.module)
if ($public_downloads && $preprocess_css) {
- $files_aggregates_included[$media] = $files_included[$media];
+ $files_aggregates_included[$media] = (!empty($files_included[$media]) ? $files_included[$media] : ''); // Patch: for 'Undefined index: 'all' and several others
$files = array();
foreach ($types as $type) {
foreach ($type as $file => $cache) {
if ($cache) {
$files[] = $file;
$files_included[$media][$file] = TRUE;
unset($files_aggregates_included[$file]);
}
}
}
$preprocess_files = advagg_css_js_file_builder('css', $files);
It would be good if Drupal coders checked there own code with PHP 5.x Notices enabled!
PHP bugs are very often discovered this way!
Comments
Comment #1
mikeytown2 commentedlol, I run with
on all my dev boxes. It's just the nature of PHP, what works on my setup may not work on yours. And in this case depending on what is added via drupal_add_css this can be triggered. For me it was never triggered. This is why php notices are so important, they show potential flaws in the logic of your implementation of the code. Thanks for the report and the following patch has been committed.