Problem/Motivation
I'm noticing the following deprecation notice while installing from existing config:
Deprecated function: strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in file_encrypt_field_config_presave() (line 67 of modules/contrib/file_encrypt/file_encrypt.module).
file_encrypt_field_config_presave(Object)
call_user_func_array('file_encrypt_field_config_presave', Array) (Line: 403)
Drupal\Core\Extension\ModuleHandler->invokeAll('field_config_presave', Array) (Line: 347)
Drupal\Core\Config\Entity\ConfigEntityStorage->invokeHook('presave', Object) (Line: 500)
Drupal\Core\Entity\EntityStorageBase->doPreSave(Object) (Line: 454)
Drupal\Core\Entity\EntityStorageBase->save(Object) (Line: 263)
Drupal\Core\Config\Entity\ConfigEntityStorage->save(Object) (Line: 395)
Drupal\Core\Entity\EntityBase->save() (Line: 616)
Drupal\Core\Config\Entity\ConfigEntityBase->save() (Line: 379)
Drupal\Core\Config\Entity\ConfigEntityStorage->importUpdate('field.field.node.myfield.te_files', Object, Object) (Line: 997)
Drupal\Core\Config\ConfigImporter->importInvokeOwner('', 'update', 'field.field.node.myfield.te_files') (Line: 783)
Drupal\Core\Config\ConfigImporter->processConfiguration('', 'update', 'field.field.node.myfield.te_files') (Line: 610)
Drupal\Core\Config\ConfigImporter->processConfigurations(Array) (Line: 514)
Drupal\Core\Config\ConfigImporter->doSyncStep('processConfigurations', Array) (Line: 490)
Drupal\Core\Config\ConfigImporter->import() (Line: 2445)
install_config_revert_install_changes(Array) (Line: 695)
install_run_task(Array, Array) (Line: 570)
install_run_tasks(Array, NULL) (Line: 118)
install_drupal(Object) (Line: 44)
Steps to reproduce
Install a D8 site from existing config where at least one file field is configured to use File Encrypt.
(I suspect upon debugging we'll identify better steps to reproduce this deprecation notice as the issue is better understood.)
Proposed resolution
Address deprecation notice.
Remaining tasks
User interface changes
None.
API changes
None.
Data model changes
None.
Comments
Comment #2
saurabhkanva commentedThis patch should resolve the notice.
Comment #3
dmundraComment #5
dmundraFixed the notices and updated the latest dev version.
Comment #7
dmundra