I'm getting this Notice from two functions and can't completely solve this myself.
system\helper\image.php:
Code: Select all
<?php
final class HelperImage {
static public function resize($filename, $width, $height) {
if (!file_exists(DIR_IMAGE . $filename)) {
return;
}
$old_image = $filename;
$new_image = 'cache/' . eregi_replace('\.([a-z]{3,4})', '-' . $width . 'x' . $height . '.jpg', $filename);
if (!file_exists(DIR_IMAGE . $new_image) || (filemtime(DIR_IMAGE . $old_image) > filemtime(DIR_IMAGE . $new_image))) {
$image = new Image(DIR_IMAGE . $old_image);
$image->resize($width, $height);
$image->save(DIR_IMAGE . $new_image);
}
### PHP notice : Undefined index: HTTPS
### Changing this seems to work
+- #if (@$_SERVER['HTTPS'] != 'on') {
++ if (HTTPS_SERVER != 'on') {
return HTTP_IMAGE . $new_image;
} else {
return HTTPS_IMAGE . $new_image;
}
}
}
?>
Code: Select all
<?php
class ControllerCommonLayout extends Controller {
protected function index() {
$this->data['title'] = $this->document->title;
$this->data['description'] = $this->document->description;
### PHP notice : Undefined index: HTTPS
$this->data['base'] = (@$this->request->server['HTTPS'] != 'on') ? HTTP_SERVER : HTTPS_SERVER;
Cheers