No Code Attached Yet
avatar durian808
durian808
13 Mar 2022

am i being thick - why not just change your code to use the correct relative path?

Originally posted by @brianteeman in #37241 (comment)

avatar durian808 durian808 - open - 13 Mar 2022
avatar joomla-cms-bot joomla-cms-bot - change - 13 Mar 2022
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 13 Mar 2022
avatar brianteeman
brianteeman - comment - 13 Mar 2022

The code change you proposed is wrong.
The other bugs you linked to are not related.
The problem is that the code in the plugin is wrong. It will never have worked if for example the site was installed in a subdirectory.

Joomla should not change its code to account for bad code by a third party

My comment referred to the code in the plugin that should be changed not the code in Joomla

avatar richard67 richard67 - change - 13 Mar 2022
Status New Closed
Closed_Date 0000-00-00 00:00:00 2022-03-13 12:58:48
Closed_By richard67
avatar richard67 richard67 - close - 13 Mar 2022
avatar richard67
richard67 - comment - 13 Mar 2022

Closing due to reasons explained in the previous comment.

avatar durian808
durian808 - comment - 13 Mar 2022

Then why was the function adding JPATH_ROOT to the beginning of the path? It's because the authors of the function realized that a leading "/" might be passed. That's good, that's defensive programming. It points out the fact that is_dir() and is_file() have a new behavior with a new version of PHP, and this was not something the original authors knew about.

What we have here is the admin UI of Virtuemart spitting out a warning. Isn't it bad coding in Joomla that Joomla isn't giving an understandable error – i.e. rejecting the input with an understandable error message – instead of relying on a PHP function to spit out a cryptic warning?

I'm concerned that there are many instances of is_dir() and is_file() being used in the Joomla core, and this issue may pop up again and again, resulting in Joomla spitting out this PHP warning in lots of extensions. Wouldn't it be prudent to examine all the code and make appropriate modifications?

And what about my treatment in #37241? I was not treated very well. Do you want people to report bugs? I mean I was honestly reporting what I thought was something Joomla should not be doing, and I was treated very poorly.

thanks

avatar richard67
richard67 - comment - 13 Mar 2022

@durian808 In #37241 you were the one who first started to become offending in your comment here #37241 (comment) :

You need to look more closely at this, or get out of the way so another developer can do that.

And in the further discussion you continued in this style, e.g.

No, no, no. Look... If you guys can't understand this, then get a developer in here who does.

I have not seen any place where people have treated you in the same way.

So maybe you should think about your way to communicate with people.

avatar durian808
durian808 - comment - 13 Mar 2022

No, Mr. Grammatiko was first.

Anyway... @brianteeman

Then why was the function adding JPATH_ROOT to the beginning of the path? It's because the authors of the function realized that a leading "/" might be passed. That's good, that's defensive programming. It points out the fact that is_dir() and is_file() have a new behavior with a new version of PHP, and this was not something the original authors knew about.

What we have here is the admin UI of Virtuemart spitting out a warning. Isn't it bad coding in Joomla that Joomla isn't giving an understandable error – i.e. rejecting the input with an understandable error message – instead of relying on a PHP function to spit out a cryptic warning?

I'm concerned that there are many instances of is_dir() and is_file() being used in the Joomla core, and this issue may pop up again and again, resulting in Joomla spitting out this PHP warning in lots of extensions. Wouldn't it be prudent to examine all the code and make appropriate modifications?

Add a Comment

Login with GitHub to post a comment