Wrong inclusion of utility.inc

suit4 - February 6, 2009 - 15:43
Project:Imagecache Actions
Version:6.x-1.1
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

The inclusion of utility.inc in some of the modules seems to be problematic, as they are just included via

<?php
require_once('utility.inc');
?>

but should be included like
<?php
require_once drupal_get_path('module', 'imagecache_actions') .'utility.inc';
?>

otherwise there might occur an error.

Patches attached

AttachmentSize
imagecache_canvasactions-includeFix.patch416 bytes
imagecache_coloractions-includeFix.patch402 bytes
imagecache_textactions-includeFix.patch512 bytes

#1

dman - February 7, 2009 - 12:42
Status:needs review» fixed

Thanks. True enough, we are supposed to be more careful with our includes, although I've not found problems with this one so far.
I get the idea with the patches - although
- there is no actual 'imagecache_actions' module to lookup, so that would have failed.
- if successful, that require would have needed an extra '/' in the pathname.

Anyway, I'm pathing the affected files with the simple:

<?php
require_once(dirname(__FILE__) .'/utility.inc');
?>

and all is cool.

Rolling soon when I add another feature (imagefield)
Thanks!

#2

System Message - February 21, 2009 - 12:50
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.