Skip to content
Snippets Groups Projects
Commit 8f9427ba authored by Joachim Valdemar Yde's avatar Joachim Valdemar Yde Committed by Vasvi Sharma
Browse files

Add patch to filefield_paths

parent 0df90d49
No related branches found
No related tags found
1 merge request!245Add patch to filefield_paths
......@@ -333,6 +333,10 @@
"drupal/captcha": {
"Fixes CAPTCHAs not loading due to not being able to access font directory https://www.drupal.org/project/captcha/issues/3211385": "patches/captcha-white-image-captcha-3211385-12.patch"
},
"drupal/filefield_paths": {
"Fixes call to a member function isEmpty() on null https://www.drupal.org/project/filefield_paths/issues/3339688": "patches/filefield_paths-call_isEmpty_on_null-3339688-4.patch"
},
"__comments__": {}
},
"merge-plugin": {
......
diff --git a/filefield_paths.module b/filefield_paths.module
index f496834..73bf41a 100644
--- a/filefield_paths.module
+++ b/filefield_paths.module
@@ -361,7 +361,7 @@ function filefield_paths_entity_update(EntityInterface $entity) {
*/
function filefield_paths_file_presave($file) {
// Store original filename in the database.
- if ($file->origname->isEmpty() && !$file->filename->isEmpty()) {
+ if (isset($file->origname) && $file->origname->isEmpty() && !$file->filename->isEmpty()) {
$file->origname = $file->filename;
}
}
@@ -498,7 +498,7 @@ function filefield_paths_local_tasks_alter(&$local_tasks) {
return;
}
}
- // Provide filesystem route if it not exists.
+ // Provide filesystem route if it not exists.
$local_tasks['system.file_system_settings'] = [
'route_name' => 'system.file_system_settings',
'base_route' => 'system.file_system_settings',
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment