summaryrefslogtreecommitdiff
path: root/includes/common.inc
diff options
context:
space:
mode:
Diffstat (limited to 'includes/common.inc')
-rw-r--r--includes/common.inc5
1 files changed, 2 insertions, 3 deletions
diff --git a/includes/common.inc b/includes/common.inc
index ab763bad7..e5e8150dc 100644
--- a/includes/common.inc
+++ b/includes/common.inc
@@ -7468,7 +7468,6 @@ function drupal_parse_info_file($filename) {
*/
function drupal_parse_info_format($data) {
$info = array();
- $constants = get_defined_constants();
if (preg_match_all('
@^\s* # Start at the beginning of a line, ignoring leading whitespace
@@ -7508,8 +7507,8 @@ function drupal_parse_info_format($data) {
}
// Handle PHP constants.
- if (isset($constants[$value])) {
- $value = $constants[$value];
+ if (preg_match('/^\w+$/i', $value) && defined($value)) {
+ $value = constant($value);
}
// Insert actual value.