Closed ghost closed 3 years ago
@paul-gene Thanks, we'll take a look.
Hi - We were able to replicate the issue, but only by removing the @
operator on L164. We're using this when checking if the supplied HTML is compressed or not - if there's an error the error should be suppressed and the method returns false.
What version of PHP are you running please?
I'm running PHP 7.3.
But, it looks like it was my xdebug settings (scream) that meant the @
error suppressor was being ignored.
With that said, usage of @
isn't ideal anyway.
Ah that's actually good intel re xdebug. I was seeing the error in a different context and wondering why.
Yes we'd much prefer a try catch but gzuncompress
doesn't throw an exception.
Previous to using @gzuncompress
we had:
if (substr($string, 0, 1) == 'e' && substr_count($string, ' ') == 0) {
return true;
}
return false;
but this was returning false positives in some cases.
If you know of a better way we'd happily check it out! 👍
@sta1r have you considered using this work around? https://www.php.net/manual/en/function.gzuncompress.php#79042
Alternatively, don't use gzcompress/gzuncompress?
I think that's a workaround for cases where you are ingesting compressed strings that you didn't originally compress yourself - we'd be confident that any compressed template strings would have been compressed by us initially.
We know for sure that campaigns can exceed 64kb in size (mysql's limit for TEXT columns), so we do need some solution for compressing the HTML.
When trying to set a new Default Theme for the Global scope in Content > Design > Configuration, this error shows:
This is on Magento 2.3.5-p2, with Dotmailer 4.4.0 (installed with Magento)