Skip to content

Commit d71fb74

Browse files
committed
replaces incorrect sprintf placeholders with default placeholders
1 parent 987b9cf commit d71fb74

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/UploadedFile.php

+6-6
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ public function __construct($file, $name = null, $type = null, $size = null, $er
183183
public function getStream()
184184
{
185185
if ($this->moved) {
186-
throw new \RuntimeException(sprintf('Uploaded file %1s has already been moved', $this->name));
186+
throw new \RuntimeException(sprintf('Uploaded file %s has already been moved', $this->name));
187187
}
188188
if ($this->stream === null) {
189189
$this->stream = new Stream(fopen($this->file, 'r'));
@@ -239,22 +239,22 @@ public function moveTo($targetPath)
239239

240240
if ($targetIsStream) {
241241
if (!copy($this->file, $targetPath)) {
242-
throw new RuntimeException(sprintf('Error moving uploaded file %1s to %2s', $this->name, $targetPath));
242+
throw new RuntimeException(sprintf('Error moving uploaded file %s to %s', $this->name, $targetPath));
243243
}
244244
if (!unlink($this->file)) {
245-
throw new RuntimeException(sprintf('Error removing uploaded file %1s', $this->name));
245+
throw new RuntimeException(sprintf('Error removing uploaded file %s', $this->name));
246246
}
247247
} elseif ($this->sapi) {
248248
if (!is_uploaded_file($this->file)) {
249-
throw new RuntimeException(sprintf('%1s is not a valid uploaded file', $this->file));
249+
throw new RuntimeException(sprintf('%s is not a valid uploaded file', $this->file));
250250
}
251251

252252
if (!move_uploaded_file($this->file, $targetPath)) {
253-
throw new RuntimeException(sprintf('Error moving uploaded file %1s to %2s', $this->name, $targetPath));
253+
throw new RuntimeException(sprintf('Error moving uploaded file %s to %s', $this->name, $targetPath));
254254
}
255255
} else {
256256
if (!rename($this->file, $targetPath)) {
257-
throw new RuntimeException(sprintf('Error moving uploaded file %1s to %2s', $this->name, $targetPath));
257+
throw new RuntimeException(sprintf('Error moving uploaded file %s to %s', $this->name, $targetPath));
258258
}
259259
}
260260

0 commit comments

Comments
 (0)