Getting this error on Webform on my D10 site while viewing webform submissions: (e.g. /admin/structure/webform/manage/**webform_machine_name**/results/submissions)
Deprecated function: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in Drupal\webform\WebformSubmissionListBuilder->getEntityIds() (line 1310 of modules/contrib/webform/src/WebformSubmissionListBuilder.php).
This appears to happen because TableSort::getOrder($header, $this->request) can return $order['sql'] null, and the subsequent strpos can't handle the null value.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 3383921-deprecated-strpos-2.patch | 750 bytes | trevorbradley |
Issue fork webform-3383921
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
trevorbradley commentedQuick and simple patch to properly check for null values.
Comment #3
trevorbradley commentedComment #4
trevorbradley commentedComment #5
trevorbradley commentedComment #8
cilefen commentedI think the idea is to fix all of these in #3381257: [Drupal 10.1] Deprecated code rather than in separate issues.
Comment #9
jrockowitz commentedThis is not precisely a D10 issue. I think it is a PHP 8.1 notice.
Comment #10
cilefen commentedOf course it's PHP. I evidently didn't understand the true goal of #3381257: [Drupal 10.1] Deprecated code.
Comment #11
jrockowitz commentedLOL, the goal is to stop people solely looking for commit credit from creating dozens of deprecated code fix tickets.
Comment #12
trevorbradley commentedI don't care about commit credit at all. Just desperately needed this fixed for my site.
Close this ticket as a duplicate and steal the code for the main ticket, genuinely dont mind at all.
Comment #17
jrockowitz commentedComment #18
jrockowitz commented