[5.3] Replace calls to dirname(__FILE) with __DIR__#44882
[5.3] Replace calls to dirname(__FILE) with __DIR__#44882rdeutz merged 1 commit intojoomla:5.3-devfrom
Conversation
|
All these files are the Joomla entry points for the app. I'm not sure if this change will work with the public folder... |
|
I don't think there is a difference. WordPress uses |
joomdonation
left a comment
There was a problem hiding this comment.
Some changes need to be reverted to make sure fatal error is not thrown when we tried to access in PHP older than 5.3 (Yes, I know it is not going to happen on real life these days, but it is states in the beginning of the file, so we better respect that rule).
Well, WP doesn't have an option for public folder #40509 but anyways that wasn't really the reason as @joomdonation mentioned it's about compatibility for ancient PHP versions in the app entry points |
HLeithner
left a comment
There was a problem hiding this comment.
As tuan said, don't change the entry points, we don't win anything here and only loose better looking error messages for really old php versions.
2c0f1dc to
3300441
Compare
|
I've reverted the changes in the PHP error messages. |
|
I have tested this item ✅ successfully on 3300441 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/44882. |
|
I have tested this item ✅ successfully on 3300441 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/44882. |
|
RTC This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/44882. |
Use the
__DIR__constant. It's shorter and doesn't require a function call.Link to documentations
Please select:
Documentation link for docs.joomla.org:
No documentation changes for docs.joomla.org needed
Pull Request link for manual.joomla.org:
No documentation changes for manual.joomla.org needed