@Ambal89
Новичок в web'e

Какая ошибка в php коде?

Доброго времени суток, понимаю, что пальцем в небо, но вдруг повезёт:
Использую на опенкарте 2.3.0.2 модуль Magic Zoom Plus (модуль для лупы в карточке товара). И проблема такая: когда имеется больше одной картинки для товара - слетает кодировка и пишет предупреждение
spoiler
77d29e4ebaa54f53b339ad2369816f33.png

Текст ошибки:
spoiler

Warning:imagejpeg(D:/OpenServer/domains/jewel/image/magictoolbox_cache\cf3e6ec01aac7cb79461bcfe9d0d075e\ 4\3\432_product\thumb300x300\1542837706\premium-quality-fashion-jewellery-yellow-gold-plated-blue-cubic-zircon-necklace-and-earrings-set-with-bracelet-for-women-and-girls-a9092.jpg): failed to open stream: Invalid argument in D:\OpenServer\domains\jewel\admin\controller\extension\module\magiczoomplus-opencart-module\magictoolbox.imagehelper.class.php on line 588Warning: imagejpeg(D:/OpenServer/domains/jewel/image/magictoolbox_cache\cf3e6ec01aac7cb79461bcfe9d0d075e \4\3\432_product\thumb600x600\1542837706\premium-quality-fashion-jewellery-yellow-gold-plated-blue-cubic-zircon-necklace-and-earrings-set-with-bracelet-for-women-and-girls-a9092.jpg): failed to open stream: Invalid argument in D:\OpenServer\domains\jewel\admin\controller\extension\module\magiczoomplus-opencart-module\magictoolbox.imagehelper.class.php on line 588Warning: imagejpeg(D:/OpenServer/domains/jewel/image/magictoolbox_cache\cf3e6ec01aac7cb79461bcfe9d0d075e \4\3\432_product\selector70x70\1542837706\premium-quality-fashion-jewellery-yellow-gold-plated-blue-cubic-zircon-necklace-and-earrings-set-with-bracelet-for-women-and-girls-a9092.jpg): failed to open stream: Invalid argument in D:\OpenServer\domains\jewel\admin\controller\extension\module\magiczoomplus-opencart-module\magictoolbox.imagehelper.class.php on line 588Warning: imagejpeg(D:/OpenServer/domains/jewel/image/magictoolbox_cache\cf3e6ec01aac7cb79461bcfe9d0d075e \4\3\432_product\selector140x140\1542837706\premium-quality-fashion-jewellery-yellow-gold-plated-blue-cubic-zircon-necklace-and-earrings-set-with-bracelet-for-women-and-girls-a9092.jpg): failed to open stream: Invalid argument in D:\OpenServer\domains\jewel\admin\controller\extension\module\magiczoomplus-opencart-module\magictoolbox.imagehelper.class.php on line 588

Часть кода, на который ругается:
switch($size[2]) {
                    case 1: function_exists('imagegif') && imagegif($out, $this->file);
                    case 3: imagepng($out, $this->file); break;
                    case 2: imagejpeg($out, $this->file, $q); break;
                }

588 строка - самая нижняя.
Что может быть не так? плагин не модернизировал, из "коробки".
  • Вопрос задан
  • 252 просмотра
Пригласить эксперта
Ответы на вопрос 2
webinar
@webinar Куратор тега PHP
Учим yii: https://youtu.be/-WRMlGHLgRg
Вопрос для тех кто хорошо видит?
Вижу, что break; не хватает для case 1
Но ошибку прочитать не смог
Ответ написан
Судя по ошибке $q содержит неверные значения, выведите дампом значение $q на экран для дебага
Ответ написан
Комментировать
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы