Unverified Commit cdf0726e authored by Lee Rowlands's avatar Lee Rowlands
Browse files

Issue #3204763 by longwave: Fix mismatched sprintf calls

parent fe06cae4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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 {
+1 −1
Original line number Diff line number Diff line
@@ -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.
+1 −1
Original line number Diff line number Diff line
@@ -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.
+1 −1
Original line number Diff line number Diff line
@@ -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']) {
+1 −1
Original line number Diff line number Diff line
@@ -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',
Loading