Page MenuHomePhorge

PHP 8.1 "strlen(null)" exception in AphrontRequest.php when cookieprefix not set
Closed, ResolvedPublic

Description

Fedora 38 machine with PHP 8.2.5. Just pulled Phorge; trying to set up a local Phorge test installation.
After locally fixing T15260, I now run into:

RuntimeException: strlen(): Passing null to parameter #1 ($string) of type string is deprecated

triggered by getPrefixedCookieName($name) in https://we.phorge.it/source/phorge/browse/master/src/aphront/AphrontRequest.php .

Should probably replace
if (strlen($this->cookiePrefix)) {
with
if (phutil_nonempty_string($this->cookiePrefix)) {
or such.