Моля за вашият съвет как да премахна тази грешка - Parse error: syntax error, unexpected '$geometry' (T_VARIABLE) in /home/eurofor1/public_html/oc-includes/osclass/classes/ImageResizer.php on line 49
Получава се когато при публикуване на обява се добавят снимки.
Сайта е : www.eurofor1.com, платформата на която е базиран е osclass. Използвах backup на системата, като изтрих файла ImageResizer.php и го заместих с този отпреди 20 дни когато сайта работеше коректно но нямаше ефект.
Ето файла в момента:
private function __construct($imagePath) {
if(!file_exists($imagePath)) { throw new Exception(sprintf(__("%s does not exist!"), $imagePath)); };
if(!is_readable($imagePath)) { throw new Exception(sprintf(__("%s is not readable!"), $imagePath)); };
if(filesize($imagePath)==0) { throw new Exception(sprintf(__("%s is corrupt or broken!"), $imagePath)); };
if(osc_use_imagick()) {
$this->im = new Imagick($imagePath);
$geometry = $this->im->getImageGeometry();
$this->_width = $geometry['width'];
$this->_height = $geometry['height'];
} else {
$content = file_get_contents($imagePath);
$this->im = imagecreatefromstring($content);
$this->_width = imagesx($this->im);
$this->_height = imagesy($this->im);
}
Моля за съвет как може да се коригира тази грешка или проблемът не е само в този ред 49 а и другаде ?
Получава се когато при публикуване на обява се добавят снимки.
Сайта е : www.eurofor1.com, платформата на която е базиран е osclass. Използвах backup на системата, като изтрих файла ImageResizer.php и го заместих с този отпреди 20 дни когато сайта работеше коректно но нямаше ефект.
Ето файла в момента:
private function __construct($imagePath) {
if(!file_exists($imagePath)) { throw new Exception(sprintf(__("%s does not exist!"), $imagePath)); };
if(!is_readable($imagePath)) { throw new Exception(sprintf(__("%s is not readable!"), $imagePath)); };
if(filesize($imagePath)==0) { throw new Exception(sprintf(__("%s is corrupt or broken!"), $imagePath)); };
if(osc_use_imagick()) {
$this->im = new Imagick($imagePath);
$geometry = $this->im->getImageGeometry();
$this->_width = $geometry['width'];
$this->_height = $geometry['height'];
} else {
$content = file_get_contents($imagePath);
$this->im = imagecreatefromstring($content);
$this->_width = imagesx($this->im);
$this->_height = imagesy($this->im);
}
Моля за съвет как може да се коригира тази грешка или проблемът не е само в този ред 49 а и другаде ?