Page MenuHomePhorge

PhabricatorProjectCoreTestCase: fix "Implicit conversion from float "
Closed, InvalidPublic

Description

Look at the errors in this patch:

D25173: Fix PHP 8.1 "strlen(null)" exception which blocks rendering project's Configure Menu page

Sometime the unit tests in PhabricatorProjectCoreTestCase say something weird like:

EXCEPTION (RuntimeException): Implicit conversion from float 178.5 to int loses precision
#0 /var/www/html/phorge/phorge/src/applications/files/builtin/PhabricatorFilesComposeAvatarBuiltinFile.php(192): PhutilErrorHandler::handleError(8192, '...', '...', 192)
#1 /var/www/html/phorge/phorge/src/applications/files/builtin/PhabricatorFilesComposeAvatarBuiltinFile.php(148): PhabricatorFilesComposeAvatarBuiltinFile::rgba2gd(Array)

That is probably a nonsense and deserves a fix, to avoid to scary code proposers with weird unit test errors, and without unrelated false positives.

Event Timeline

valerio.bozzolan updated the task description. (Show Details)