Page MenuHomePhorge

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

Asked by adrelanos on Dec 6 2023, 07:33.


Some Maniphest tasks are still showing in the web interface:

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

How to fix?

I am on:

commit 11424ffbe66457336573dcce32a3befa229f1de3 (HEAD -> stable, origin/stable)
Merge: 52be52d429 56789a2fa6
Author: Aviv Eyal <>
Date:   Fri Aug 25 04:52:45 2023 -0700

    Promote 2023.32 to Stable

I manually applied this fix from D25488. Also restarted php and phd.

systemctl restart php8.2-fpm.service
./phabricator/bin/phd restart

Is this the same bug as D25488 another bug? That bug is about dashboards. In my case it is about a Maniphest task.

Should I share the link to my instance where this is happening or any debug logs?


Updated 208 Days Ago

Preamble: avoid PHP 8.1+ in production or later with Phorge. That version is not officially supported.

Having said that, the work for that is massive, and tracked in T15064. Thanks for any help in sharing a stack trace for that error. For example, taking the stack trace from your log file of your webserver. Without a stack trace, understanding the root cause of that problem is super-complicated. Here hints about how to find that log file:

Updated 222 Days Ago

I want to get the rest of T15554 landed this weekend and a new RC cut, which will at least make these problems stop blocking.
It usually takes about 2 weeks to get the new RC "approved" and promoted to Stable....

Meanwhile, you can try to cherry-pick D25387, which will hide deprecation warnings (instead of blowing up the server).

Updated 217 Days Ago

Thank you for your assistance!

I am not even on PHP 8.1. I am on PHP 8.2. That is the version that comes with the current version of Debian stable. It's difficult for me to downgrade PHP.

I've now switched phabricator and arcanist to git master. That means I already have D25387?

Instead of the previous error message "strlen(): Passing null to parameter #1 ($string) of type string is deprecated" I now get "502 Bad Gateway".

2023/12/06 16:36:49 [error] 3445965#3445965: *322 FastCGI sent in stderr: "PHP message: [2023-12-06 16:36:49] ERROR 8192: strlen(): Passing null to parameter #1 ($string) of type string is deprecated at [/var/phabricator/phabricator/src/applications/maniphest/xaction/ManiphestTaskTitleTransaction.php:33]; PHP message: arcanist(head=master, ref.master=e46025f7a914), phorge(head=master, ref.master=c8a927006067); PHP message:   #0 strlen(NULL) called at [<phorge>/src/applications/maniphest/xaction/ManiphestTaskTitleTransaction.php:33]; PHP message:   #1 ManiphestTaskTitleTransaction::getTitle() called at [<phorge>/src/applications/transactions/storage/PhabricatorModularTransaction.php:127]; PHP message:   #2 PhabricatorModularTransaction::getTitle() called at [<phorge>/src/applications/maniphest/storage/ManiphestTransaction.php:136]; PHP message:   #3 ManiphestTransaction::getTitle() called at [<phorge>/src/applications/transactions/view/PhabricatorApplicationTransactionView.php:448]; PHP message:   #4 PhabricatorApplicationTransactionView::renderEvent(ManiphestTransaction, array) called at [<phorge>/src/applications/transactions/view/PhabricatorApplicationTransactionView.php:182]; PHP message:   #5 PhabricatorApplicationTransactionView::buildEvents(boolean) called at [<phorge>/src/applications/transactions/view/PhabricatorApplicationTransactionView.php:230]; PHP message:   #6 PhabricatorApplicationTransactionView::buildPHUITimelineView() called at [<phorge>/src/applications/transactions/view/PhabricatorApplicationTransactionView.php:209]; PHP message:   #7 PhabricatorApplicationTransactionView::render() called at [<phorge>/src/view/AphrontView.php:222]; PHP message:   #8 AphrontView::producePhutilSafeHTML() called at [<phorge>/src/infrastructure/markup/render.php:115]; PHP message:   #9 phutil_escape_html(PhabricatorApplicationTransactionView) called at [<phorge>/src/infrastructure/markup/render.php:139]; PHP message:   #10 phutil_escape_html(array) called at [<phorge>/src/infrastructure/markup/render.php:139]; PH

Is this the stacktrace you were asking for?

Please let me know if anything else is required for this bug report.

I will not be able to "answer" here again due to this being Ponder. Could you convert this to a bug report please so we can have a continued discussion or may I have permission please to create a bug report?

New Answer