-
-
Notifications
You must be signed in to change notification settings - Fork 57
Fixes #9 Bridge error when no file is selected #23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
$temporaryPath = $this->getTemporaryPath(); | ||
$psrUploadedFile->moveTo($temporaryPath); | ||
$temporaryPath = ''; | ||
$clientFileName = null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you could set this to ''
. below there is a check against null which only needs to trigger if $psrUploadedFile->getClientFilename()
returns null.
Please squash commits per author (1 commit per author). |
Fixed PHP 5.3.3 array syntax
8f83138
to
e5d62e6
Compare
$file = new UploadedFile('', '', null, 0, UPLOAD_ERR_NO_FILE, true); | ||
$this->assertEquals(0, $file->getSize()); | ||
$this->assertEquals(UPLOAD_ERR_NO_FILE, $file->getError()); | ||
$this->assertFalse($file->getSize()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There should be a third argument like this:
$this->assertFalse($file->getSize(), 'SplFile::getSize() returns false on error');
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't you mean a second argument to assertFalse
? It would be a third argument for assertEquals
, but the comment you linked to erroneously mentioned assertFalse
.
Assert false doesn't take a third argument.
It looks like all the comments from #10 have been addressed here. Does anyone else have any issues, or can we merge this? |
Thank you @Danielss89. |
…ielss89) This PR was merged into the master branch. Discussion ---------- Fixes #9 Bridge error when no file is selected Q A Bug fix? yes New feature? no BC breaks? no Deprecations? no Tests pass? yes Fixed tickets #9 License MIT Doc PR Commits ------- a1a631a Update assert error message e5d62e6 Fixes based on code-review 101b608 Handles null file in createrequest bridge.
Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #9
License MIT
Doc PR