Skip to content

Conversation

vlastavesely
Copy link
Contributor

Fixes problem with calling 'pathinfo()' with null filename.

  • bug fix? yes
  • BC break? no

Fixes problem with calling 'pathinfo()' with null filename.
@f3l1x
Copy link
Member

f3l1x commented Apr 5, 2018

Maybe file should be not null? I'm not sure, just wondering.. @dg ?

@vlastavesely
Copy link
Contributor Author

Image::send() calls the save() function with $file being set to NULL and you can never be sure whether someone does not use the same way in their application. I think that it would be a BC. My solution just converts confusing typehint error to more understandable exception.

@dg dg merged commit 760445d into nette:master Apr 5, 2018
dg pushed a commit that referenced this pull request Apr 5, 2018
Fixes problem with calling 'pathinfo()' with null filename.
@vlastavesely
Copy link
Contributor Author

@dg What does it solve? Image::save() still can be called with no arguments and thus emit TypeError (pathinfo() expects parameter 1 to be string, null given).

@dg
Copy link
Member

dg commented Apr 6, 2018

Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants