? Pending

User tests: Successful: Unsuccessful:

avatar obsidev
obsidev
18 Jul 2018

Pull Request for Issue (not reported yet) .

Summary of Changes

The class JFilterInput is no more, the call to isSafeFile needs to be updated to Joomla\CMS\Filter\InputFilter;

Testing Instructions

Call the File::upload function with parameter $allow_unsafe "false" (which is the default value).

Expected result

The function isSafeFile will be called.

Actual result

A fatal error will raise due to the missing JInputFilter class.

Documentation Changes Required

None

avatar obsidev obsidev - open - 18 Jul 2018
avatar obsidev obsidev - change - 18 Jul 2018
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 18 Jul 2018
Category Libraries
avatar obsidev obsidev - change - 18 Jul 2018
Title
migration JFilterInput to InputFilter
[4.0] Migration JFilterInput to InputFilter for File
avatar obsidev obsidev - edited - 18 Jul 2018
avatar mbabker
mbabker - comment - 18 Jul 2018

A fatal error will raise due to the missing JInputFilter class.

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).

avatar laoneo
laoneo - comment - 19 Jul 2018

If I'm not wrong, then this needs to be done against the 3.9 branch as we namespaced there the Filesystem package.

avatar obsidev
obsidev - comment - 24 Jul 2018

@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 !

avatar laoneo
laoneo - comment - 25 Jul 2018

We just need it in 3.9 fixed too. If you do it namespaced or not is not that important.

avatar bayareajenn bayareajenn - test_item - 30 Jul 2018 - Tested successfully
avatar bayareajenn
bayareajenn - comment - 30 Jul 2018

I have tested this item successfully on f51f4ea

I tested this on 3.9 and can now load media to Media.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/21174.

avatar franz-wohlkoenig franz-wohlkoenig - test_item - 31 Jul 2018 - Tested successfully
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 31 Jul 2018

I have tested this item successfully on f51f4ea

Also tested on 3.9 and can load Images to Media.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/21174.

avatar franz-wohlkoenig franz-wohlkoenig - change - 31 Jul 2018
Status Pending Ready to Commit
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 31 Jul 2018

Ready to Commit after two successful tests.

avatar laoneo laoneo - change - 31 Jul 2018
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: ?
avatar laoneo laoneo - close - 31 Jul 2018
avatar laoneo laoneo - merge - 31 Jul 2018
avatar laoneo
laoneo - comment - 31 Jul 2018

Thanks!

Add a Comment

Login with GitHub to post a comment