diff --git a/core/modules/php/php.install b/core/modules/php/php.install index f2281f2..bac358c 100644 --- a/core/modules/php/php.install +++ b/core/modules/php/php.install @@ -13,15 +13,7 @@ function php_enable() { // first install (or if the format has been manually deleted) as there is no // reliable method to identify the format in an uninstall hook or in // subsequent clean installs. - $format_exists = FALSE; - $filter_formats = entity_load_multiple('filter_format'); - foreach ($filter_formats as $format) { - if ($format->name == 'PHP code') { - $format_exists = TRUE; - break; - } - } - if (!$format_exists) { + if (!entity_load('filter_format', 'php_code')) { $php_format_config = array( 'format' => 'php_code', 'name' => 'PHP code',