diff --git a/core/modules/block/src/Plugin/migrate/process/BlockVisibility.php b/core/modules/block/src/Plugin/migrate/process/BlockVisibility.php index fe05cc6babf73ba59709444ed90e0627ee221a2b..ac39128bcf8a56af06f36d293b3826e65b397c84 100644 --- a/core/modules/block/src/Plugin/migrate/process/BlockVisibility.php +++ b/core/modules/block/src/Plugin/migrate/process/BlockVisibility.php @@ -123,7 +123,7 @@ public function transform($value, MigrateExecutableInterface $migrate_executable // anything else -- the block will simply have no PHP or request_path // visibility configuration. elseif ($this->skipPHP) { - throw new MigrateSkipRowException(sprintf("The block with bid '%d' from module '%s' will have no PHP or request_path visibility configuration.", $row->getSourceProperty('bid'), $row->getSourceProperty('module'), $destination_property)); + throw new MigrateSkipRowException(sprintf("The block with bid '%d' from module '%s' will have no PHP or request_path visibility configuration.", $row->getSourceProperty('bid'), $row->getSourceProperty('module'))); } } else { diff --git a/core/modules/file/src/Plugin/rest/resource/FileUploadResource.php b/core/modules/file/src/Plugin/rest/resource/FileUploadResource.php index e650ed145da0c9182880919fd7e30a9b6fa01584..e16ddba453c03ba50ec3a9c000c90852e581bf93 100644 --- a/core/modules/file/src/Plugin/rest/resource/FileUploadResource.php +++ b/core/modules/file/src/Plugin/rest/resource/FileUploadResource.php @@ -264,7 +264,7 @@ public function post(Request $request, $entity_type_id, $bundle, $field_name) { $lock_id = $this->generateLockIdFromFileUri($file_uri); if (!$this->lock->acquire($lock_id)) { - throw new HttpException(503, sprintf('File "%s" is already locked for writing'), NULL, ['Retry-After' => 1]); + throw new HttpException(503, sprintf('File "%s" is already locked for writing', $file_uri), NULL, ['Retry-After' => 1]); } // Begin building file entity. diff --git a/core/modules/jsonapi/src/Controller/TemporaryJsonapiFileFieldUploader.php b/core/modules/jsonapi/src/Controller/TemporaryJsonapiFileFieldUploader.php index 39ef17f38704e9230cf37bf8fc57e70f9c1ebc65..979c05cb8594bf0e9f2587f3184f651c6f008a30 100644 --- a/core/modules/jsonapi/src/Controller/TemporaryJsonapiFileFieldUploader.php +++ b/core/modules/jsonapi/src/Controller/TemporaryJsonapiFileFieldUploader.php @@ -181,7 +181,7 @@ public function handleFileUploadForField(FieldDefinitionInterface $field_definit $lock_id = $this->generateLockIdFromFileUri($file_uri); if (!$this->lock->acquire($lock_id)) { - throw new HttpException(503, sprintf('File "%s" is already locked for writing.'), NULL, ['Retry-After' => 1]); + throw new HttpException(503, sprintf('File "%s" is already locked for writing.', $file_uri), NULL, ['Retry-After' => 1]); } // Begin building file entity. diff --git a/core/modules/serialization/src/Normalizer/EntityReferenceFieldItemNormalizer.php b/core/modules/serialization/src/Normalizer/EntityReferenceFieldItemNormalizer.php index 0bfed445c9fdfa668f09e7de6aa83da84cf05fa5..7c3bd00d019ea8ed88ba9101a88feb23fe5056c8 100644 --- a/core/modules/serialization/src/Normalizer/EntityReferenceFieldItemNormalizer.php +++ b/core/modules/serialization/src/Normalizer/EntityReferenceFieldItemNormalizer.php @@ -75,7 +75,7 @@ protected function constructValue($data, $context) { /** @var \Drupal\Core\Field\Plugin\Field\FieldType\EntityReferenceItem $field_item */ $field_item = $context['target_instance']; if (empty($data['target_uuid'])) { - throw new InvalidArgumentException(sprintf('If provided "target_uuid" cannot be empty for field "%s".', $data['target_type'], $data['target_uuid'], $field_item->getName())); + throw new InvalidArgumentException(sprintf('If provided "target_uuid" cannot be empty for field "%s".', $field_item->getName())); } $target_type = $field_item->getFieldDefinition()->getSetting('target_type'); if (!empty($data['target_type']) && $target_type !== $data['target_type']) { diff --git a/core/modules/serialization/tests/src/Unit/Normalizer/EntityReferenceFieldItemNormalizerTest.php b/core/modules/serialization/tests/src/Unit/Normalizer/EntityReferenceFieldItemNormalizerTest.php index 4e83171b205bfebf7f4a9ca0e8d1a5ab77733765..617dce5271d7667ff94c52b6d93fc5374c61b4e4 100644 --- a/core/modules/serialization/tests/src/Unit/Normalizer/EntityReferenceFieldItemNormalizerTest.php +++ b/core/modules/serialization/tests/src/Unit/Normalizer/EntityReferenceFieldItemNormalizerTest.php @@ -395,7 +395,7 @@ public function testDenormalizeWithTypeWithIncorrectUuid() { */ public function testDenormalizeWithEmptyUuid() { $this->expectException(InvalidArgumentException::class); - $this->expectExceptionMessage('If provided "target_uuid" cannot be empty for field "test_type".'); + $this->expectExceptionMessage('If provided "target_uuid" cannot be empty for field "field_reference".'); $data = [ 'target_id' => 'test', diff --git a/core/modules/views/src/Plugin/views/field/FieldPluginBase.php b/core/modules/views/src/Plugin/views/field/FieldPluginBase.php index a8a31f4f17f41b9dd5c269da91c9928d670e442e..8207fce70cb25bb490277545750191c2bb597c93 100644 --- a/core/modules/views/src/Plugin/views/field/FieldPluginBase.php +++ b/core/modules/views/src/Plugin/views/field/FieldPluginBase.php @@ -187,7 +187,7 @@ protected function addAdditionalFields($fields = NULL) { if (empty($table_alias)) { trigger_error(sprintf( - "Handler % tried to add additional_field %s but % could not be added!", + "Handler %s tried to add additional_field %s but %s could not be added!", $this->definition['id'], $identifier, $info['table']