Skip to content

Move the JPATH_PLATFORM constant to the compat plugin #348

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

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open
12 changes: 12 additions & 0 deletions migrations/54-60/compat-plugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,15 @@ The plugin is implemented as "Behaviour" plugin type to guarantee that is loaded
For more detail check [Compatibility Plugin Joomla! 5.0](https://manual.joomla.org/migrations/44-50/compat-plugin).


### JPATH_PLATFORM constant

- PR: https://github.com/joomla/joomla-cms/pull/44638
- File: All bootstrapping files
- Description: The `JPATH_PLATFORM` is an old constant and should not be used if the Joomla core got correctly bootstrapped. Change your checks to `_JEXEC`
```php
// Old:
\defined('JPATH_PLATFORM') or die;

// New:
\defined('_JEXEC') or die;
```