Since PHP 8.1, passing a null string to ltrim(string $string) is deprecated.
Thus first check if After and Below text are not null before trimming.
Closes T15379
Differential D25212
Fix PHP 8.1 "ltrim(null)" exception which blocks rendering first Meme comment aklapper on May 10 2023, 13:59. Authored by Tags None Referenced Files
Tokens
Details
Since PHP 8.1, passing a null string to ltrim(string $string) is deprecated. Thus first check if After and Below text are not null before trimming. Closes T15379 Applied this change; afterwards several times created a new Pholio mock and added a Meme comment. I could not reproduce the problem anymore (first meme comment in a mock always rendered correctly instead of showing an exception as comment). However, I could not reliably reproduce the problem anyway.
Diff Detail
Event TimelineComment Actions Thanks for addressing this issue We still need to work on this since, before this change this was allowed: {meme, src=somememe, above=0, below=0} But after this change, the resulting meme has no above/below texts. (Note: it's not so easy to test what I'm saying, since memes are cached from the above/below fingerprint, so, to test this locally, we have to upload another meme for each test to be conducted)
|