Browse Source

MIRSPORTA-80

Проверка существования метода getWatermark перед его использованием
master
Alexander Demidov 11 years ago
parent
commit
5aa0c30e06
  1. 5
      Upload.class.php
  2. 2
      push-update.sh

5
Upload.class.php

@ -79,7 +79,10 @@ abstract class Upload
. ' ' . self::getFilePath($image_variant));
ob_clean();
}
if ($image->getWatermark($size) && Config::get('PYTHON_PIL_PASTE')) {
if (Config::get('PYTHON_PIL_PASTE') &&
function_exists(array($image, 'getWatermark')) &&
$image->getWatermark($size)
) {
$script_file_path = Config::get('PYTHON_PIL_PASTE')->script_file_path;
$pil_options = (isset(Config::get('PYTHON_PIL_PASTE')->pil_options) && Config::get('PYTHON_PIL_PASTE')->pil_options) ? ' ' . implode(' ', Config::get('PYTHON_PIL_PASTE')->pil_options) : '';
ob_start();

2
push-update.sh

@ -72,7 +72,7 @@ do
then
{
git push origin master > /dev/null &&
cd /var/www/d753/ && ./merge-from-master.sh > /dev/null
cd /var/www/d753_predelanet/ && ./merge-from-master.sh > /dev/null
cd /var/www/d753_10ballov/ && ./merge-from-master.sh > /dev/null
} || {
echo -e "Failed to update dependency d753 branches... Please resolve that problem by hand\n"

Loading…
Cancel
Save