devel/phabricator: Fix php 8.1 issue when rendering avatars

This commit is contained in:
Michael Gmelin 2023-10-12 18:45:41 +02:00
parent 66cca73d89
commit acd67e6f2d
2 changed files with 12 additions and 1 deletions

View file

@ -1,6 +1,6 @@
PORTNAME= phabricator PORTNAME= phabricator
PORTVERSION= 20211218 PORTVERSION= 20211218
PORTREVISION= 1 PORTREVISION= 2
CATEGORIES= devel CATEGORIES= devel
PKGNAMESUFFIX= ${PHP_PKGNAMESUFFIX} PKGNAMESUFFIX= ${PHP_PKGNAMESUFFIX}

View file

@ -0,0 +1,11 @@
--- src/applications/files/builtin/PhabricatorFilesComposeAvatarBuiltinFile.php.orig 2021-12-18 19:11:09 UTC
+++ src/applications/files/builtin/PhabricatorFilesComposeAvatarBuiltinFile.php
@@ -188,7 +188,7 @@ final class PhabricatorFilesComposeAvatarBuiltinFile
$g = $rgba[1];
$b = $rgba[2];
$a = $rgba[3];
- $a = (1 - $a) * 255;
+ $a = round(((1 - $a) * 255), 0);
return ($a << 24) | ($r << 16) | ($g << 8) | $b;
}