- Issue created by @allandk
- Assigned to Binoli Lalani
- @binoli-lalani opened merge request.
- Issue was unassigned.
- 🇮🇳India Binoli Lalani Gujarat
Hello,
I have created MR to fix this warning. Please review.
Thank you!
- Status changed to Needs review
over 1 year ago 9:16am 30 January 2023 - Status changed to Needs work
over 1 year ago 3:26pm 30 January 2023 - 🇺🇸United States pianomansam
Let's get some tests around reproducing and solving this.
- public function tokensPreAlter(&$text, $data, $options) { + public function tokensPreAlter(string &$text, $data, $options) {
@binoli-lalani I'm not sure this is the best approach. How can we be sure that the code upstream only passes in a string? In fact, this error report indicates that it's passing in
NULL
. - 🇧🇾Belarus fromme
I also faced this problem:
And i think the best solution is to check if
$text
is string and then find matches.
Attached patch here and updated the issue branch. - last update
11 months ago 5 pass - Status changed to Needs review
11 months ago 12:27pm 24 July 2023 - last update
11 months ago 5 pass - Status changed to Needs work
11 months ago 2:27pm 24 July 2023 - 🇺🇸United States pianomansam
@fromme thank you for your report and patch. I'm having a hard time reproducing this. Before a patch can be accepted, we need a test that can reproduce and test that the patch fixes the issue. Can you at least help me reproduce it?
- 🇧🇾Belarus fromme
@pianomansam, sure.
In my case tt happens while using quiz module - on add/edit forms of quizes and questions.
Enabled modules of quiz - https://prnt.sc/QvqqrdtJnKD_I tested with:
- drupal 10.0.10;
- quiz 6.x-dev#6d6f65d9 + patch for d10 ( https://www.drupal.org/project/quiz/issues/3356316 📌 Drupal 10 compatibility fixes Fixed )
- token_or 2.1.0Let me know if i should attached detailed settings of quiz module.
- 🇺🇸United States pianomansam
@fromme testing with the quiz module sounds pretty involved, so I'm not sure it will work here. Out of curiosity, what's the token you're using that gives the error?
- last update
11 months ago 6 pass - @pianomansam opened merge request.
- last update
11 months ago 6 pass -
pianomansam →
committed f332b15e on 2.x
Issue #3337496 by fromme, pianomansam: Deprecated function:...
-
pianomansam →
committed f332b15e on 2.x
- Status changed to Fixed
11 months ago 3:08pm 25 July 2023 - 🇺🇸United States pianomansam
I was able to reproduce this issue. Apparently, some modules directly send
NULL
into the token service. Automatically closed - issue fixed for 2 weeks with no activity.