Use of an undeclared constant

kiamlaluno - July 1, 2008 - 19:28
Project:interwiki
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:active
Description

in interwiki.module there is the following line:

<?php
$form
[interwiki]['intro'] = array('#type' => 'markup', '#value' => "<p>$output</p>");
?>

which should be written:

<?php
$form
['interwiki']['intro'] = array('#type' => 'markup', '#value' => "<p>$output</p>");
?>

Actually, undeclared constants have the value of a string containing the constant name, but that behavior can change in future. Or it can have a collateral effect if a module defines the interwiki constant.

 
 

Drupal is a registered trademark of Dries Buytaert.