diff --git a/src/applications/macro/engine/PhabricatorMemeEngine.php b/src/applications/macro/engine/PhabricatorMemeEngine.php index e1befc20a2..71a45033da 100644 --- a/src/applications/macro/engine/PhabricatorMemeEngine.php +++ b/src/applications/macro/engine/PhabricatorMemeEngine.php @@ -273,7 +273,7 @@ final class PhabricatorMemeEngine extends Phobject { $size = $metrics['size']; $above = $this->getAboveText(); - if (strlen($above)) { + if ($above !== null && phutil_nonempty_string(trim($above))) { $x = (int)floor(($dx - $metrics['text']['above']['width']) / 2); $y = $metrics['text']['above']['height'] + 12; @@ -281,7 +281,7 @@ final class PhabricatorMemeEngine extends Phobject { } $below = $this->getBelowText(); - if (strlen($below)) { + if ($below !== null && phutil_nonempty_string(trim($below))) { $x = (int)floor(($dx - $metrics['text']['below']['width']) / 2); $y = $dy - 12 - $metrics['text']['below']['descend'];