Viewing 1 post (of 1 total)
  • Author
    Posts
  • #40662
    Beee
    Participant

    If you instantiate a new Image_Watermark class (to apply Watermarks through PHP), the constant is already defined, which creates a php notice.

    PHP Notice: Constant IMAGE_WATERMARK_BACKUP_DIR already defined in /var/www/html/web/app/plugins/image-watermark/image-watermark.php on line 128

    To fix this, you would either need to improve the constant settings, since you need to check first if a constant is already defined or create a better function.

    A constant is constant as in does not change. You offer the option to override it with a filter.The filter is a good thing, but imo not where it is applied.

    My suggestion would be to create a function which checks if the filter is applied, if so, return the filter (location), if not, check if constant is defined, if so, return that.

Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.