-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[Uploadable] Remove deprecation warning when calling is_file with a null value #2901
base: main
Are you sure you want to change the base?
[Uploadable] Remove deprecation warning when calling is_file with a null value #2901
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2901 +/- ##
==========================================
+ Coverage 78.66% 78.67% +0.01%
==========================================
Files 167 167
Lines 8746 8747 +1
==========================================
+ Hits 6880 6882 +2
+ Misses 1866 1865 -1 ☔ View full report in Codecov by Sentry. |
Do you have a stack trace showing how this method is being called with null? The doc block says that only strings should be passed in, so something else is already |
Hi @mbabker . Here's what we get in Sentry: I guess we could add a check in |
That's helpful as it leads me to two other minor issues:
Making changes around those two methods in theory should ensure that the listener isn't calling |
Hey, thanks for your comment. Do you want me to make changes you listed in my PR? |
Yes, that'd be the more correct fix to make here. |
…o pendingFileRemovals array
25f3bfe
to
ebae19a
Compare
Hey @mbabker . Sorry for the delay! I've implemented what you mentioned but I left the check I originally added as nothing really prevents WDYT? |
Hi!
We've been getting lots of deprecation warning (Deprecated: is_file(): Passing null to parameter #1 ($filename) of type string is deprecated) coming from
src/Uploadable/UploadableListener::removeFile
:This PR simply adds a check for null:
Thanks for reviewing!