Closed (fixed)
Project:
ImageCache Defaults
Version:
7.x-1.0-beta4
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
13 Dec 2012 at 13:04 UTC
Updated:
24 Jan 2013 at 15:30 UTC
I had been receiving an error after running update.php regarding $description and $severity not being set;
I've changed the following lines in the imagecache_defaults_requirements() function (lines 37 - 40);
$requirements['imagecache_defaults'] = array(
'title' => $t('Image (Cache) Defaults'),
-- 'description' => $description,
-- 'severity' => $severity,
-- 'value' => $value,
++ 'description' => isset($description)?$description:'',
++ 'severity' => isset($severity)?$severity:'',
++ 'value' => isset($value)?$value:'',
);
Comments
Comment #1
jjmackow commented<?php
/**
* @file
* Installation file for Image (Cache) Defaults module.
*/
/**
* Implements hook_uninstall().
*/
function imagecache_defaults_uninstall() {
variable_del('imagecache_defaults_broken_path_handling');
variable_del('imagecache_defaults_default_image_style');
variable_del('imagecache_defaults_watchdog_enabled');
}
/**
* Implements hook_requirements().
*/
function imagecache_defaults_requirements($phase) {
$requirements = array();
$t = get_t();
if ($phase == 'runtime') {
if ($path = _imagecache_defaults_image_search(FALSE)) {
$description = $t('Default image found at %path', array('%path' => $path));
$severity = REQUIREMENT_OK;
$value = $t('Default image found');
}
else {
$description = $t('Image (Cache) Defaults cannot find a default image to use when repairing broken image paths. Please read README.txt for more information.');
$severity = REQUIREMENT_ERROR;
$value = $t('Default image not found');
}
}
$requirements['imagecache_defaults'] = array(
'title' => $t('Image (Cache) Defaults'),
'description' => isset($description)?$description:'',
'severity' => isset($severity)?$severity:'',
'value' => isset($value)?$value:'',
);
return $requirements;
}
Comment #2
thedavidmeister commentedfair enough. I was trying to be too clever and screwed it up :P
Comment #3
thedavidmeister commentedI'm pushing something like this up to dev now, it should be simpler than sprinkling isset() around:
Comment #4
thedavidmeister commentedPushed a fix for this to 6.x-1.x and 7.x-1.x
@jjmackow, I think I didn't receive any notifications of this bug because you assigned it to yourself when you first opened the issue. Please don't do that unless you're going to provide a patch.
Comment #5
thedavidmeister commentedI've rolled a beta3 version for both 6.x and 7.x with this fix included. If you could download 7.x-1.0-beta3 and let me know if you're having any more issues that would be great, thanks.
Comment #6
thedavidmeister commentedSorry, use 7.x-1.0-beta4 (current release now). I accidentally rolled some badness into beta3.
Comment #7
thedavidmeister commentedSorry, use beta4 as I accidentally rolled some badness into beta3 by not providing an upgrade path for the new cache schema.