User tests: Successful: Unsuccessful:
Pull Request for Issue (not reported yet) .
The class JFilterInput is no more, the call to isSafeFile needs to be updated to Joomla\CMS\Filter\InputFilter;
Call the File::upload function with parameter $allow_unsafe "false" (which is the default value).
The function isSafeFile will be called.
A fatal error will raise due to the missing JInputFilter class.
None
Status | New | ⇒ | Pending |
Category | ⇒ | Libraries |
Title |
|
If I'm not wrong, then this needs to be done against the 3.9 branch as we namespaced there the Filesystem package.
@laoneo You're right. I checked and there is the same code in 3.9 branch.
Well, we can see to just add the \
in 3.9 (and 3.10) as @mbabker previously said.
I'm not sure that adding commits in that PR for J3.9 would be the best.
Since it's something easy to fix, we should try to fix it the faster way !
We just need it in 3.9 fixed too. If you do it namespaced or not is not that important.
I have tested this item
I tested this on 3.9 and can now load media to Media.
I have tested this item
Also tested on 3.9 and can load Images to Media.
Status | Pending | ⇒ | Ready to Commit |
Ready to Commit after two successful tests.
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2018-07-31 05:55:06 |
Closed_By | ⇒ | laoneo | |
Labels |
Added:
?
|
Thanks!
This shouldn't fatal because of the class mapping aliases, specifically this line.
With that being said, when you're in a namespaced class (such as the File class), calls to global class names need a leading
\
to work (so in this context\JFilterInput
would work correctly,JFilterInput
won't because PHP will try to resolve the class within the current namespace).So while the PR is definitely correct, we shouldn't be having missing class errors for the core classes as long as things are done right (and in this case without the PR it's not).