Okay, so I've been scratching my head over this one for the last couple of hours now and getting nowhere.
I've added a method to the Product_Image class to set the image sizes from an array in _config.php which works a treat using default values but as soon as I call the method from _config.php I get the _SESSION error.
It's nothing to do with the code within the function as I've removed it and it still generates the same error.
Here's the code in the hope someone can point out what is bound to be an obvious ommission
_config.php
Product_Image::set_productImageConfig(array('paddingBgColor' => 'ff0000'));
product.php
class Product_Image extends Image {
...
protected static $productImageConfig = array(
"paddingBgColor" => "ffffff",
"thumbnailWidth" => "150",
"thumbnailHeight" => "100",
"thumbnailQuality" => "80",
"contentImageWidth" => "150",
"contentImageQuality" => "90",
"largeImageWidth" => "500",
"largeImageQuality" => "90"
);
...
public static function set_productImageConfig($config) {
if (is_Array($config)) {
foreach ($config as $k => $v) {
if (array_key_exists ($k, self::$productImageConfig) && !is_null($v)) {
self::$productImageConfig[$k] = $v;
}
}
}
}
...
}