By robloach on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
8.x
Introduced in version:
8.0-alpha4
Issue links:
Description:
The PHP Filter module has been removed from Drupal Core and moved to a contributed module at http://drupal.org/project/php .
If your contributed modules allows a Drupal user to execute php via the interface you should update it. The method of checking depends on the existing an instance of ModuleHandler on your object:
- Check
$this->moduleHandler->moduleExists('php') && user_access('use PHP for settings')before allowing the code to be entered. - Check
$this->moduleHandler->moduleExists('php')before allowing the code to be executed.
If your object does not have an instance of ModuleHandler available, it can be accessed statically:
\Drupal::moduleHandler()->moduleExists('php')
Impacts:
Site builders, administrators, editors
Module developers