I got this error when running this module with Drupal 9.3 and PHP 8.1:
Deprecated function: substr(): Passing null to parameter #1 ($string) of type string is deprecated in Drupal\schema\SchemaDatabaseSchema_mysql->inspect() (line 203 of modules/contrib/schema/src/SchemaDatabaseSchema_mysql.php).
Drupal\schema\SchemaDatabaseSchema_mysql->inspect() (Line: 331)
schema_compare_schemas(Array) (Line: 53)
schema_requirements('runtime')
call_user_func_array(Object, Array) (Line: 426)
Drupal\Core\Extension\ModuleHandler->Drupal\Core\Extension\{closure}(Object, 'schema') (Line: 405)
Drupal\Core\Extension\ModuleHandler->invokeAllWith('requirements', Object) (Line: 433)
Drupal\Core\Extension\ModuleHandler->invokeAll('requirements', Array) (Line: 109)
Drupal\system\SystemManager->listRequirements() (Line: 93)
Drupal\system\SystemManager->checkRequirements() (Line: 124)
Drupal\system\Controller\SystemController->overview('system.admin_config')
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: 159)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 81)
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: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->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: 709)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
Normally happens when I access the configurations page as administrator, I didn't check other pages.
Comments
Comment #2
fkatsukawaComment #3
fkatsukawaHere is a patch for this.
Comment #4
fkatsukawaComment #5
jrglasgow commentedpatch in #3 is working for me
Comment #6
avpadernoComment #7
avpadernoComment #8
avpadernoIt doesn't make much sense to verify the last four characters are
'_bin'when$r->collation_namedoesn't contain a string.Comment #9
adaucyjI'll try another approach.
Comment #10
adaucyjPlease, let me know if it makes sense.
Comment #11
avpadernoYes, that works!
is_string()doesn't complain about getting a value that isn't a string and the patch avoids the deprecation error.Comment #12
avpadernoComment #14
jcnventura