Problem/Motivation
I just upgraded to php 8.1 from php 7.4
Now I am getting the following error on the status report page:
Deprecated function: substr(): Passing null to parameter #1 ($string) of type string is deprecated in audiofield_check_audiowaveform_installed() (line 163 of modules/contrib/audiofield/audiofield.module).
audiofield_check_audiowaveform_installed() (Line: 104)
audiofield_requirements('runtime')
call_user_func_array('audiofield_requirements', Array) (Line: 403)
Drupal\Core\Extension\ModuleHandler->invokeAll('requirements', Array) (Line: 109)
Drupal\system\SystemManager->listRequirements() (Line: 49)
Drupal\system\Controller\SystemInfoController->status()
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 564)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 158)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 80)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 58)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 317)
Drupal\cleantalk\EventSubscriber\BootSubscriber->handle(Object, 1, 1) (Line: 49)
Asm89\Stack\Cors->handle(Object, 1, 1) (Line: 57)
Drupal\advban\AdvbanMiddleware->handle(Object, 1, 1) (Line: 50)
Drupal\ban\BanMiddleware->handle(Object, 1, 1) (Line: 265)
Drupal\shield\ShieldMiddleware->bypass(Object, 1, 1) (Line: 164)
Drupal\shield\ShieldMiddleware->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 708)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
I do not even use "Audiowaveform", so why is this error coming up?
Steps to reproduce
Simply install and enable module while using php 8.1. Do not enable Audiowaveform and go to status report page.
Comments
Comment #2
jsidigital commentedSeems like I managed to get it fixed.
See attached patch to see if it works for you.
Comment #4
daniel.moberly commentedCommitted. Thanks!
Comment #5
joelseguinPatch in #2 worked without issues for me. Is it possible to cut a new release to include it? With PHP 7.4 EOL just around the corner, I'm sure other users of the module will greatly appreciate it.
Comment #6
daniel.moberly commentedYes, I will do so.
Comment #7
daniel.moberly commentedComment #8
joelseguinAwesome - thanks!